1/*
2 * AFCS_MODEL1_sid.h
3 *
4 * Code generation for model "AFCS_MODEL1_sf".
5 *
6 * Model version : 1.995
7 * Simulink Coder version : 8.10 (R2016a) 10-Feb-2016
8 * C source code generated on : Wed Aug 11 17:17:39 2021
9 *
10 * Target selection: rtwsfcn.tlc
11 * Note: GRT includes extra infrastructure and instrumentation for prototyping
12 * Embedded hardware selection: ARM Compatible->ARM Cortex
13 * Emulation hardware selection:
14 * Differs from embedded hardware (MATLAB Host)
15 * Code generation objectives: Unspecified
16 * Validation result: Not run
17 *
18 * SOURCES: AFCS_MODEL1_sf.c AFCS_MODEL1_CodeReuseSubsystem.c
19 */
20
21/* statically allocated instance data for model: AFCS_MODEL1 */
22{
23 extern const ConstB_AFCS_MODEL1_T AFCS_MODEL1_Invariant;
24
25 {
26 /* Local SimStruct for the generated S-Function */
27 static LocalS slS;
28 LocalS *lS = &slS;
29 ssSetUserData(rts, lS);
30
31 /* block I/O */
32 {
33 static B_AFCS_MODEL1_T sfcnB;
34 void *b = (real_T *) &sfcnB;
35 ssSetLocalBlockIO(rts, b);
36 (void) memset(b, 0,
37 sizeof(B_AFCS_MODEL1_T));
38
39 {
40 ((B_AFCS_MODEL1_T *) ssGetLocalBlockIO(rts))->FixPtSwitch = (0ULL);
41 ((B_AFCS_MODEL1_T *) ssGetLocalBlockIO(rts))->Output = (0ULL);
42 ((B_AFCS_MODEL1_T *) ssGetLocalBlockIO(rts))->FixPtSum1 = (0ULL);
43 ((B_AFCS_MODEL1_T *) ssGetLocalBlockIO(rts))->Quaternions[0] = 0.0F;
44 ((B_AFCS_MODEL1_T *) ssGetLocalBlockIO(rts))->Quaternions[1] = 0.0F;
45 ((B_AFCS_MODEL1_T *) ssGetLocalBlockIO(rts))->Quaternions[2] = 0.0F;
46 ((B_AFCS_MODEL1_T *) ssGetLocalBlockIO(rts))->Quaternions[3] = 0.0F;
47 }
48 }
49
50 _ssSetConstBlockIO(rts, &AFCS_MODEL1_Invariant);
51
52 /* previous zero-crossing states */
53 {
54 int_T i;
55 static PrevZCX_AFCS_MODEL1_T AFCS_MODEL1_PrevZCX;
56 ZCSigState *zc = (ZCSigState *) &AFCS_MODEL1_PrevZCX;
57 _ssSetPrevZCSigState(rts, zc);
58 for (i = 0; i < 2; i++) {
59 zc[i] = UNINITIALIZED_ZCSIG;
60 }
61 }
62
63 /* model checksums */
64 ssSetChecksumVal(rts, 0, 3122258030U);
65 ssSetChecksumVal(rts, 1, 1365478836U);
66 ssSetChecksumVal(rts, 2, 3803939167U);
67 ssSetChecksumVal(rts, 3, 1395178863U);
68
69 {
70 /* child S-Function registration */
71 ssSetNumSFunctions(rts, 170);
72
73 /* register each child */
74 {
75 static SimStruct childSFunctions[170];
76 static SimStruct *childSFunctionPtrs[170];
77 (void) memset((void *)&childSFunctions[0], 0,
78 sizeof(childSFunctions));
79 _ssSetSFunctions(rts, &childSFunctionPtrs[0]);
80
81 {
82 int_T i;
83 for (i = 0; i < 170; i++) {
84 _ssSetSFunction(rts, i, &childSFunctions[i]);
85 }
86 }
87
88 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S174>/Generated S-Function (LagFilter_sf) */
89 {
90 SimStruct *childS = ssGetSFunction(rts, 0);
91
92 /* timing info */
93 static time_T sfcnPeriod[1];
94 static time_T sfcnOffset[1];
95 static int_T sfcnTsMap[1];
96 (void) memset((void*)sfcnPeriod, 0,
97 sizeof(time_T)*1);
98 (void) memset((void*)sfcnOffset, 0,
99 sizeof(time_T)*1);
100 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
101 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
102 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
103
104 /* Set up the mdlInfo pointer */
105# ifdef USE_RTMODEL
106
107 {
108 static struct _ssBlkInfo2 _blkInfo2;
109 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
110 ssSetBlkInfo2Ptr(childS, blkInfo2);
111 }
112
113 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
114
115# else
116
117 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
118
119# endif /* USE_RTMODEL */
120
121 /* Allocate memory of model methods 2 */
122 {
123 static struct _ssSFcnModelMethods2 methods2;
124 ssSetModelMethods2(childS, &methods2);
125 }
126
127 /* Allocate memory of model methods 3 */
128 {
129 static struct _ssSFcnModelMethods3 methods3;
130 ssSetModelMethods3(childS, &methods3);
131 }
132
133 /* Allocate memory for states auxilliary information */
134 {
135 static struct _ssStatesInfo2 statesInfo2;
136 static ssPeriodicStatesInfo periodicStatesInfo;
137 ssSetStatesInfo2(childS, &statesInfo2);
138 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
139 }
140
141 /* inputs */
142 {
143 static struct _ssPortInputs inputPortInfo[6];
144 _ssSetNumInputPorts(childS, 6);
145 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
146
147 /* port 0 */
148 {
149 static real32_T const *sfcnUPtrs[1];
150 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
151 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReuseS;
152 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
153 _ssSetInputPortNumDimensions(childS, 0, 1);
154 ssSetInputPortWidth(childS, 0, 1);
155 }
156
157 /* port 1 */
158 {
159 static int8_T const *sfcnUPtrs[1];
160 sfcnUPtrs[0] = (int8_T const *) &((B_AFCS_MODEL1_T *)
161 ssGetLocalBlockIO(rts))->DataTypeConversion3_h;
162 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
163 _ssSetInputPortNumDimensions(childS, 1, 1);
164 ssSetInputPortWidth(childS, 1, 1);
165 }
166
167 /* port 2 */
168 {
169 static real32_T const *sfcnUPtrs[1];
170 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled107;
171 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
172 _ssSetInputPortNumDimensions(childS, 2, 1);
173 ssSetInputPortWidth(childS, 2, 1);
174 }
175
176 /* port 3 */
177 {
178 static real32_T const *sfcnUPtrs[1];
179 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
180 ssGetLocalBlockIO(rts))->Switch_k;
181 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
182 _ssSetInputPortNumDimensions(childS, 3, 1);
183 ssSetInputPortWidth(childS, 3, 1);
184 }
185
186 /* port 4 */
187 {
188 static real32_T const *sfcnUPtrs[1];
189 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
190 ssGetLocalBlockIO(rts))->Switch_k;
191 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
192 _ssSetInputPortNumDimensions(childS, 4, 1);
193 ssSetInputPortWidth(childS, 4, 1);
194 }
195
196 /* port 5 */
197 {
198 static real32_T const *sfcnUPtrs[1];
199 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
200 ssGetLocalBlockIO(rts))->Switch4;
201 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
202 _ssSetInputPortNumDimensions(childS, 5, 1);
203 ssSetInputPortWidth(childS, 5, 1);
204 }
205 }
206
207 /* outputs */
208 {
209 static struct _ssPortOutputs outputPortInfo[1];
210 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
211 _ssSetNumOutputPorts(childS, 1);
212
213 /* port 0 */
214 {
215 _ssSetOutputPortNumDimensions(childS, 0, 1);
216 ssSetOutputPortWidth(childS, 0, 1);
217 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
218 *) ssGetLocalBlockIO(rts))->GeneratedSFunction));
219 }
220 }
221
222 /* path info */
223 _ssSetModelName(childS, "LagFilter_sf");
224 _ssSetPath(childS,
225 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/apthrustLcontrol/FixthrustL/ lag filter/Generated S-Function");
226 if (ssGetRTModel(rts) == (NULL)) {
227 _ssSetParentSS(childS, rts);
228 _ssSetRootSS(childS, ssGetRootSS(rts));
229 } else {
230 ssSetRTModel(childS,ssGetRTModel(rts));
231 _ssSetParentSS(childS, (NULL));
232 _ssSetRootSS(childS, childS);
233 }
234
235 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
236
237 /* work vectors */
238 {
239 static struct _ssDWorkRecord dWorkRecord[4];
240 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
241 ssSetSFcnDWork(childS, dWorkRecord);
242 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
243 _ssSetNumDWork(childS, 4);
244
245 /* DWORK0 */
246 ssSetDWorkWidth(childS, 0, 1);
247 ssSetDWorkDataType(childS, 0,SS_SINGLE);
248 ssSetDWorkComplexSignal(childS, 0, 0);
249 ssSetDWorkUsedAsDState(childS, 0, 1);
250 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 147))[0]);
251
252 /* DWORK1 */
253 ssSetDWorkWidth(childS, 1, 1);
254 ssSetDWorkDataType(childS, 1,SS_SINGLE);
255 ssSetDWorkComplexSignal(childS, 1, 0);
256 ssSetDWorkUsedAsDState(childS, 1, 1);
257 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 148))[0]);
258
259 /* DWORK2 */
260 ssSetDWorkWidth(childS, 2, 1);
261 ssSetDWorkDataType(childS, 2,SS_INT8);
262 ssSetDWorkComplexSignal(childS, 2, 0);
263 ssSetDWorkUsedAsDState(childS, 2, 1);
264 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 374))[0]);
265
266 /* DWORK3 */
267 ssSetDWorkWidth(childS, 3, 1);
268 ssSetDWorkDataType(childS, 3,SS_INT8);
269 ssSetDWorkComplexSignal(childS, 3, 0);
270 ssSetDWorkUsedAsDState(childS, 3, 1);
271 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 375))[0]);
272 }
273
274 /* registration */
275 LagFilter_sf(childS);
276 sfcnInitializeSizes(childS);
277 sfcnInitializeSampleTimes(childS);
278
279 /* adjust sample time */
280 ssSetSampleTime(childS, 0, 0.0);
281 ssSetOffsetTime(childS, 0, 0.0);
282 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
283
284 /* set compiled values of dynamic vector attributes */
285 ssSetNumNonsampledZCs(childS, 0);
286
287 /* Update connectivity flags for each port */
288 _ssSetInputPortConnected(childS, 0, 1);
289 _ssSetInputPortConnected(childS, 1, 1);
290 _ssSetInputPortConnected(childS, 2, 1);
291 _ssSetInputPortConnected(childS, 3, 1);
292 _ssSetInputPortConnected(childS, 4, 1);
293 _ssSetInputPortConnected(childS, 5, 1);
294 _ssSetOutputPortConnected(childS, 0, 1);
295 _ssSetOutputPortBeingMerged(childS, 0, 0);
296
297 /* Update the BufferDstPort flags for each input port */
298 _ssSetInputPortBufferDstPort(childS, 0, -1);
299 _ssSetInputPortBufferDstPort(childS, 1, -1);
300 _ssSetInputPortBufferDstPort(childS, 2, -1);
301 _ssSetInputPortBufferDstPort(childS, 3, -1);
302 _ssSetInputPortBufferDstPort(childS, 4, -1);
303 _ssSetInputPortBufferDstPort(childS, 5, -1);
304
305 /* Instance data for generated S-Function: LagFilter */
306 {
307 SimStruct *rts = childS;
308
309#include "LagFilter_sfcn_rtw/LagFilter_sid.h"
310
311 }
312 }
313
314 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S186>/Generated S-Function (SaturationLimiter_sf) */
315 {
316 SimStruct *childS = ssGetSFunction(rts, 1);
317
318 /* timing info */
319 static time_T sfcnPeriod[1];
320 static time_T sfcnOffset[1];
321 static int_T sfcnTsMap[1];
322 (void) memset((void*)sfcnPeriod, 0,
323 sizeof(time_T)*1);
324 (void) memset((void*)sfcnOffset, 0,
325 sizeof(time_T)*1);
326 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
327 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
328 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
329
330 /* Set up the mdlInfo pointer */
331# ifdef USE_RTMODEL
332
333 {
334 static struct _ssBlkInfo2 _blkInfo2;
335 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
336 ssSetBlkInfo2Ptr(childS, blkInfo2);
337 }
338
339 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
340
341# else
342
343 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
344
345# endif /* USE_RTMODEL */
346
347 /* Allocate memory of model methods 2 */
348 {
349 static struct _ssSFcnModelMethods2 methods2;
350 ssSetModelMethods2(childS, &methods2);
351 }
352
353 /* Allocate memory of model methods 3 */
354 {
355 static struct _ssSFcnModelMethods3 methods3;
356 ssSetModelMethods3(childS, &methods3);
357 }
358
359 /* Allocate memory for states auxilliary information */
360 {
361 static struct _ssStatesInfo2 statesInfo2;
362 static ssPeriodicStatesInfo periodicStatesInfo;
363 ssSetStatesInfo2(childS, &statesInfo2);
364 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
365 }
366
367 /* inputs */
368 {
369 static struct _ssPortInputs inputPortInfo[3];
370 _ssSetNumInputPorts(childS, 3);
371 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
372
373 /* port 0 */
374 {
375 static real32_T const *sfcnUPtrs[1];
376 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
377 ssGetLocalBlockIO(rts))->Sum_hq;
378 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
379 _ssSetInputPortNumDimensions(childS, 0, 1);
380 ssSetInputPortWidth(childS, 0, 1);
381 }
382
383 /* port 1 */
384 {
385 static real32_T const *sfcnUPtrs[1];
386 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled111;
387 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
388 _ssSetInputPortNumDimensions(childS, 1, 1);
389 ssSetInputPortWidth(childS, 1, 1);
390 }
391
392 /* port 2 */
393 {
394 static real32_T const *sfcnUPtrs[1];
395 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled112;
396 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
397 _ssSetInputPortNumDimensions(childS, 2, 1);
398 ssSetInputPortWidth(childS, 2, 1);
399 }
400 }
401
402 /* outputs */
403 {
404 static struct _ssPortOutputs outputPortInfo[1];
405 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
406 _ssSetNumOutputPorts(childS, 1);
407
408 /* port 0 */
409 {
410 _ssSetOutputPortNumDimensions(childS, 0, 1);
411 ssSetOutputPortWidth(childS, 0, 1);
412 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
413 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_c));
414 }
415 }
416
417 /* path info */
418 _ssSetModelName(childS, "SaturationLimiter_sf");
419 _ssSetPath(childS,
420 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/apthrustLcontrol/VtControl/Saturation Limiter1/Generated S-Function");
421 if (ssGetRTModel(rts) == (NULL)) {
422 _ssSetParentSS(childS, rts);
423 _ssSetRootSS(childS, ssGetRootSS(rts));
424 } else {
425 ssSetRTModel(childS,ssGetRTModel(rts));
426 _ssSetParentSS(childS, (NULL));
427 _ssSetRootSS(childS, childS);
428 }
429
430 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
431
432 /* registration */
433 SaturationLimiter_sf(childS);
434 sfcnInitializeSizes(childS);
435 sfcnInitializeSampleTimes(childS);
436
437 /* adjust sample time */
438 ssSetSampleTime(childS, 0, 0.0);
439 ssSetOffsetTime(childS, 0, 0.0);
440 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
441
442 /* set compiled values of dynamic vector attributes */
443 ssSetNumNonsampledZCs(childS, 0);
444
445 /* Update connectivity flags for each port */
446 _ssSetInputPortConnected(childS, 0, 1);
447 _ssSetInputPortConnected(childS, 1, 1);
448 _ssSetInputPortConnected(childS, 2, 1);
449 _ssSetOutputPortConnected(childS, 0, 1);
450 _ssSetOutputPortBeingMerged(childS, 0, 0);
451
452 /* Update the BufferDstPort flags for each input port */
453 _ssSetInputPortBufferDstPort(childS, 0, -1);
454 _ssSetInputPortBufferDstPort(childS, 1, -1);
455 _ssSetInputPortBufferDstPort(childS, 2, -1);
456
457 /* Instance data for generated S-Function: SaturationLimiter */
458 {
459 SimStruct *rts = childS;
460
461#include "SaturationLimiter_sfcn_rtw/SaturationLimiter_sid.h"
462
463 }
464 }
465
466 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S188>/Generated S-Function (Gain_sf) */
467 {
468 SimStruct *childS = ssGetSFunction(rts, 2);
469
470 /* timing info */
471 static time_T sfcnPeriod[1];
472 static time_T sfcnOffset[1];
473 static int_T sfcnTsMap[1];
474 (void) memset((void*)sfcnPeriod, 0,
475 sizeof(time_T)*1);
476 (void) memset((void*)sfcnOffset, 0,
477 sizeof(time_T)*1);
478 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
479 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
480 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
481
482 /* Set up the mdlInfo pointer */
483# ifdef USE_RTMODEL
484
485 {
486 static struct _ssBlkInfo2 _blkInfo2;
487 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
488 ssSetBlkInfo2Ptr(childS, blkInfo2);
489 }
490
491 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
492
493# else
494
495 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
496
497# endif /* USE_RTMODEL */
498
499 /* Allocate memory of model methods 2 */
500 {
501 static struct _ssSFcnModelMethods2 methods2;
502 ssSetModelMethods2(childS, &methods2);
503 }
504
505 /* Allocate memory of model methods 3 */
506 {
507 static struct _ssSFcnModelMethods3 methods3;
508 ssSetModelMethods3(childS, &methods3);
509 }
510
511 /* Allocate memory for states auxilliary information */
512 {
513 static struct _ssStatesInfo2 statesInfo2;
514 static ssPeriodicStatesInfo periodicStatesInfo;
515 ssSetStatesInfo2(childS, &statesInfo2);
516 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
517 }
518
519 /* inputs */
520 {
521 static struct _ssPortInputs inputPortInfo[2];
522 _ssSetNumInputPorts(childS, 2);
523 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
524
525 /* port 0 */
526 {
527 static real32_T const *sfcnUPtrs[1];
528 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
529 ssGetLocalBlockIO(rts))->GeneratedSFunction_c;
530 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
531 _ssSetInputPortNumDimensions(childS, 0, 1);
532 ssSetInputPortWidth(childS, 0, 1);
533 }
534
535 /* port 1 */
536 {
537 static real32_T const *sfcnUPtrs[1];
538 sfcnUPtrs[0] = (real32_T const *)
539 &AFCS_MODEL1_ConstP.Constant1_Value_i;
540 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
541 _ssSetInputPortNumDimensions(childS, 1, 1);
542 ssSetInputPortWidth(childS, 1, 1);
543 }
544 }
545
546 /* outputs */
547 {
548 static struct _ssPortOutputs outputPortInfo[1];
549 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
550 _ssSetNumOutputPorts(childS, 1);
551
552 /* port 0 */
553 {
554 _ssSetOutputPortNumDimensions(childS, 0, 1);
555 ssSetOutputPortWidth(childS, 0, 1);
556 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
557 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_c5));
558 }
559 }
560
561 /* path info */
562 _ssSetModelName(childS, "Gain_sf");
563 _ssSetPath(childS,
564 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/apthrustLcontrol/VtControl/gain/Generated S-Function");
565 if (ssGetRTModel(rts) == (NULL)) {
566 _ssSetParentSS(childS, rts);
567 _ssSetRootSS(childS, ssGetRootSS(rts));
568 } else {
569 ssSetRTModel(childS,ssGetRTModel(rts));
570 _ssSetParentSS(childS, (NULL));
571 _ssSetRootSS(childS, childS);
572 }
573
574 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
575
576 /* registration */
577 Gain_sf(childS);
578 sfcnInitializeSizes(childS);
579 sfcnInitializeSampleTimes(childS);
580
581 /* adjust sample time */
582 ssSetSampleTime(childS, 0, 0.0);
583 ssSetOffsetTime(childS, 0, 0.0);
584 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
585
586 /* set compiled values of dynamic vector attributes */
587 ssSetNumNonsampledZCs(childS, 0);
588
589 /* Update connectivity flags for each port */
590 _ssSetInputPortConnected(childS, 0, 1);
591 _ssSetInputPortConnected(childS, 1, 1);
592 _ssSetOutputPortConnected(childS, 0, 1);
593 _ssSetOutputPortBeingMerged(childS, 0, 0);
594
595 /* Update the BufferDstPort flags for each input port */
596 _ssSetInputPortBufferDstPort(childS, 0, -1);
597 _ssSetInputPortBufferDstPort(childS, 1, -1);
598
599 /* Instance data for generated S-Function: Gain */
600 {
601 SimStruct *rts = childS;
602
603#include "Gain_sfcn_rtw/Gain_sid.h"
604
605 }
606 }
607
608 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S185>/Generated S-Function (LeadLagFilter_sf) */
609 {
610 SimStruct *childS = ssGetSFunction(rts, 3);
611
612 /* timing info */
613 static time_T sfcnPeriod[1];
614 static time_T sfcnOffset[1];
615 static int_T sfcnTsMap[1];
616 (void) memset((void*)sfcnPeriod, 0,
617 sizeof(time_T)*1);
618 (void) memset((void*)sfcnOffset, 0,
619 sizeof(time_T)*1);
620 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
621 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
622 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
623
624 /* Set up the mdlInfo pointer */
625# ifdef USE_RTMODEL
626
627 {
628 static struct _ssBlkInfo2 _blkInfo2;
629 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
630 ssSetBlkInfo2Ptr(childS, blkInfo2);
631 }
632
633 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
634
635# else
636
637 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
638
639# endif /* USE_RTMODEL */
640
641 /* Allocate memory of model methods 2 */
642 {
643 static struct _ssSFcnModelMethods2 methods2;
644 ssSetModelMethods2(childS, &methods2);
645 }
646
647 /* Allocate memory of model methods 3 */
648 {
649 static struct _ssSFcnModelMethods3 methods3;
650 ssSetModelMethods3(childS, &methods3);
651 }
652
653 /* Allocate memory for states auxilliary information */
654 {
655 static struct _ssStatesInfo2 statesInfo2;
656 static ssPeriodicStatesInfo periodicStatesInfo;
657 ssSetStatesInfo2(childS, &statesInfo2);
658 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
659 }
660
661 /* inputs */
662 {
663 static struct _ssPortInputs inputPortInfo[7];
664 _ssSetNumInputPorts(childS, 7);
665 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
666
667 /* port 0 */
668 {
669 static real32_T const *sfcnUPtrs[1];
670 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
671 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReuseS;
672 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
673 _ssSetInputPortNumDimensions(childS, 0, 1);
674 ssSetInputPortWidth(childS, 0, 1);
675 }
676
677 /* port 1 */
678 {
679 static int8_T const *sfcnUPtrs[1];
680 sfcnUPtrs[0] = (int8_T const *) &((B_AFCS_MODEL1_T *)
681 ssGetLocalBlockIO(rts))->DataTypeConversion1_j;
682 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
683 _ssSetInputPortNumDimensions(childS, 1, 1);
684 ssSetInputPortWidth(childS, 1, 1);
685 }
686
687 /* port 2 */
688 {
689 static real32_T const *sfcnUPtrs[1];
690 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled105;
691 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
692 _ssSetInputPortNumDimensions(childS, 2, 1);
693 ssSetInputPortWidth(childS, 2, 1);
694 }
695
696 /* port 3 */
697 {
698 static real32_T const *sfcnUPtrs[1];
699 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled105;
700 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
701 _ssSetInputPortNumDimensions(childS, 3, 1);
702 ssSetInputPortWidth(childS, 3, 1);
703 }
704
705 /* port 4 */
706 {
707 static real32_T const *sfcnUPtrs[1];
708 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
709 ssGetLocalBlockIO(rts))->Switch_k;
710 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
711 _ssSetInputPortNumDimensions(childS, 4, 1);
712 ssSetInputPortWidth(childS, 4, 1);
713 }
714
715 /* port 5 */
716 {
717 static real32_T const *sfcnUPtrs[1];
718 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
719 ssGetLocalBlockIO(rts))->Switch_k;
720 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
721 _ssSetInputPortNumDimensions(childS, 5, 1);
722 ssSetInputPortWidth(childS, 5, 1);
723 }
724
725 /* port 6 */
726 {
727 static real32_T const *sfcnUPtrs[1];
728 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
729 ssGetLocalBlockIO(rts))->GeneratedSFunction_c5;
730 _ssSetInputPortSignalPtrs(childS, 6, (InputPtrsType)&sfcnUPtrs[0]);
731 _ssSetInputPortNumDimensions(childS, 6, 1);
732 ssSetInputPortWidth(childS, 6, 1);
733 }
734 }
735
736 /* outputs */
737 {
738 static struct _ssPortOutputs outputPortInfo[1];
739 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
740 _ssSetNumOutputPorts(childS, 1);
741
742 /* port 0 */
743 {
744 _ssSetOutputPortNumDimensions(childS, 0, 1);
745 ssSetOutputPortWidth(childS, 0, 1);
746 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
747 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_n));
748 }
749 }
750
751 /* path info */
752 _ssSetModelName(childS, "LeadLagFilter_sf");
753 _ssSetPath(childS,
754 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/apthrustLcontrol/VtControl/Lead lag/Generated S-Function");
755 if (ssGetRTModel(rts) == (NULL)) {
756 _ssSetParentSS(childS, rts);
757 _ssSetRootSS(childS, ssGetRootSS(rts));
758 } else {
759 ssSetRTModel(childS,ssGetRTModel(rts));
760 _ssSetParentSS(childS, (NULL));
761 _ssSetRootSS(childS, childS);
762 }
763
764 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
765
766 /* work vectors */
767 {
768 static struct _ssDWorkRecord dWorkRecord[4];
769 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
770 ssSetSFcnDWork(childS, dWorkRecord);
771 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
772 _ssSetNumDWork(childS, 4);
773
774 /* DWORK0 */
775 ssSetDWorkWidth(childS, 0, 1);
776 ssSetDWorkDataType(childS, 0,SS_SINGLE);
777 ssSetDWorkComplexSignal(childS, 0, 0);
778 ssSetDWorkUsedAsDState(childS, 0, 1);
779 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 149))[0]);
780
781 /* DWORK1 */
782 ssSetDWorkWidth(childS, 1, 1);
783 ssSetDWorkDataType(childS, 1,SS_SINGLE);
784 ssSetDWorkComplexSignal(childS, 1, 0);
785 ssSetDWorkUsedAsDState(childS, 1, 1);
786 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 150))[0]);
787
788 /* DWORK2 */
789 ssSetDWorkWidth(childS, 2, 1);
790 ssSetDWorkDataType(childS, 2,SS_INT8);
791 ssSetDWorkComplexSignal(childS, 2, 0);
792 ssSetDWorkUsedAsDState(childS, 2, 1);
793 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 376))[0]);
794
795 /* DWORK3 */
796 ssSetDWorkWidth(childS, 3, 1);
797 ssSetDWorkDataType(childS, 3,SS_INT8);
798 ssSetDWorkComplexSignal(childS, 3, 0);
799 ssSetDWorkUsedAsDState(childS, 3, 1);
800 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 377))[0]);
801 }
802
803 /* registration */
804 LeadLagFilter_sf(childS);
805 sfcnInitializeSizes(childS);
806 sfcnInitializeSampleTimes(childS);
807
808 /* adjust sample time */
809 ssSetSampleTime(childS, 0, 0.0);
810 ssSetOffsetTime(childS, 0, 0.0);
811 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
812
813 /* set compiled values of dynamic vector attributes */
814 ssSetNumNonsampledZCs(childS, 0);
815
816 /* Update connectivity flags for each port */
817 _ssSetInputPortConnected(childS, 0, 1);
818 _ssSetInputPortConnected(childS, 1, 1);
819 _ssSetInputPortConnected(childS, 2, 1);
820 _ssSetInputPortConnected(childS, 3, 1);
821 _ssSetInputPortConnected(childS, 4, 1);
822 _ssSetInputPortConnected(childS, 5, 1);
823 _ssSetInputPortConnected(childS, 6, 1);
824 _ssSetOutputPortConnected(childS, 0, 1);
825 _ssSetOutputPortBeingMerged(childS, 0, 0);
826
827 /* Update the BufferDstPort flags for each input port */
828 _ssSetInputPortBufferDstPort(childS, 0, -1);
829 _ssSetInputPortBufferDstPort(childS, 1, -1);
830 _ssSetInputPortBufferDstPort(childS, 2, -1);
831 _ssSetInputPortBufferDstPort(childS, 3, -1);
832 _ssSetInputPortBufferDstPort(childS, 4, -1);
833 _ssSetInputPortBufferDstPort(childS, 5, -1);
834 _ssSetInputPortBufferDstPort(childS, 6, -1);
835
836 /* Instance data for generated S-Function: LeadLagFilter */
837 {
838 SimStruct *rts = childS;
839
840#include "LeadLagFilter_sfcn_rtw/LeadLagFilter_sid.h"
841
842 }
843 }
844
845 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S187>/Generated S-Function (SaturationLimiter_sf) */
846 {
847 SimStruct *childS = ssGetSFunction(rts, 4);
848
849 /* timing info */
850 static time_T sfcnPeriod[1];
851 static time_T sfcnOffset[1];
852 static int_T sfcnTsMap[1];
853 (void) memset((void*)sfcnPeriod, 0,
854 sizeof(time_T)*1);
855 (void) memset((void*)sfcnOffset, 0,
856 sizeof(time_T)*1);
857 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
858 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
859 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
860
861 /* Set up the mdlInfo pointer */
862# ifdef USE_RTMODEL
863
864 {
865 static struct _ssBlkInfo2 _blkInfo2;
866 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
867 ssSetBlkInfo2Ptr(childS, blkInfo2);
868 }
869
870 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
871
872# else
873
874 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
875
876# endif /* USE_RTMODEL */
877
878 /* Allocate memory of model methods 2 */
879 {
880 static struct _ssSFcnModelMethods2 methods2;
881 ssSetModelMethods2(childS, &methods2);
882 }
883
884 /* Allocate memory of model methods 3 */
885 {
886 static struct _ssSFcnModelMethods3 methods3;
887 ssSetModelMethods3(childS, &methods3);
888 }
889
890 /* Allocate memory for states auxilliary information */
891 {
892 static struct _ssStatesInfo2 statesInfo2;
893 static ssPeriodicStatesInfo periodicStatesInfo;
894 ssSetStatesInfo2(childS, &statesInfo2);
895 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
896 }
897
898 /* inputs */
899 {
900 static struct _ssPortInputs inputPortInfo[3];
901 _ssSetNumInputPorts(childS, 3);
902 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
903
904 /* port 0 */
905 {
906 static real32_T const *sfcnUPtrs[1];
907 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
908 ssGetLocalBlockIO(rts))->GeneratedSFunction_n;
909 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
910 _ssSetInputPortNumDimensions(childS, 0, 1);
911 ssSetInputPortWidth(childS, 0, 1);
912 }
913
914 /* port 1 */
915 {
916 static real32_T const *sfcnUPtrs[1];
917 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled109;
918 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
919 _ssSetInputPortNumDimensions(childS, 1, 1);
920 ssSetInputPortWidth(childS, 1, 1);
921 }
922
923 /* port 2 */
924 {
925 static real32_T const *sfcnUPtrs[1];
926 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled110;
927 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
928 _ssSetInputPortNumDimensions(childS, 2, 1);
929 ssSetInputPortWidth(childS, 2, 1);
930 }
931 }
932
933 /* outputs */
934 {
935 static struct _ssPortOutputs outputPortInfo[1];
936 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
937 _ssSetNumOutputPorts(childS, 1);
938
939 /* port 0 */
940 {
941 _ssSetOutputPortNumDimensions(childS, 0, 1);
942 ssSetOutputPortWidth(childS, 0, 1);
943 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
944 *) ssGetLocalBlockIO(rts))->Product1_g));
945 }
946 }
947
948 /* path info */
949 _ssSetModelName(childS, "SaturationLimiter_sf");
950 _ssSetPath(childS,
951 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/apthrustLcontrol/VtControl/Saturation Limiter3/Generated S-Function");
952 if (ssGetRTModel(rts) == (NULL)) {
953 _ssSetParentSS(childS, rts);
954 _ssSetRootSS(childS, ssGetRootSS(rts));
955 } else {
956 ssSetRTModel(childS,ssGetRTModel(rts));
957 _ssSetParentSS(childS, (NULL));
958 _ssSetRootSS(childS, childS);
959 }
960
961 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
962
963 /* registration */
964 SaturationLimiter_sf(childS);
965 sfcnInitializeSizes(childS);
966 sfcnInitializeSampleTimes(childS);
967
968 /* adjust sample time */
969 ssSetSampleTime(childS, 0, 0.0);
970 ssSetOffsetTime(childS, 0, 0.0);
971 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
972
973 /* set compiled values of dynamic vector attributes */
974 ssSetNumNonsampledZCs(childS, 0);
975
976 /* Update connectivity flags for each port */
977 _ssSetInputPortConnected(childS, 0, 1);
978 _ssSetInputPortConnected(childS, 1, 1);
979 _ssSetInputPortConnected(childS, 2, 1);
980 _ssSetOutputPortConnected(childS, 0, 1);
981 _ssSetOutputPortBeingMerged(childS, 0, 0);
982
983 /* Update the BufferDstPort flags for each input port */
984 _ssSetInputPortBufferDstPort(childS, 0, -1);
985 _ssSetInputPortBufferDstPort(childS, 1, -1);
986 _ssSetInputPortBufferDstPort(childS, 2, -1);
987
988 /* Instance data for generated S-Function: SaturationLimiter */
989 {
990 SimStruct *rts = childS;
991
992#include "SaturationLimiter_sfcn_rtw/SaturationLimiter_sid.h"
993
994 }
995 }
996
997 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S189>/Generated S-Function (Gain_sf) */
998 {
999 SimStruct *childS = ssGetSFunction(rts, 5);
1000
1001 /* timing info */
1002 static time_T sfcnPeriod[1];
1003 static time_T sfcnOffset[1];
1004 static int_T sfcnTsMap[1];
1005 (void) memset((void*)sfcnPeriod, 0,
1006 sizeof(time_T)*1);
1007 (void) memset((void*)sfcnOffset, 0,
1008 sizeof(time_T)*1);
1009 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
1010 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
1011 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
1012
1013 /* Set up the mdlInfo pointer */
1014# ifdef USE_RTMODEL
1015
1016 {
1017 static struct _ssBlkInfo2 _blkInfo2;
1018 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
1019 ssSetBlkInfo2Ptr(childS, blkInfo2);
1020 }
1021
1022 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
1023
1024# else
1025
1026 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
1027
1028# endif /* USE_RTMODEL */
1029
1030 /* Allocate memory of model methods 2 */
1031 {
1032 static struct _ssSFcnModelMethods2 methods2;
1033 ssSetModelMethods2(childS, &methods2);
1034 }
1035
1036 /* Allocate memory of model methods 3 */
1037 {
1038 static struct _ssSFcnModelMethods3 methods3;
1039 ssSetModelMethods3(childS, &methods3);
1040 }
1041
1042 /* Allocate memory for states auxilliary information */
1043 {
1044 static struct _ssStatesInfo2 statesInfo2;
1045 static ssPeriodicStatesInfo periodicStatesInfo;
1046 ssSetStatesInfo2(childS, &statesInfo2);
1047 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
1048 }
1049
1050 /* inputs */
1051 {
1052 static struct _ssPortInputs inputPortInfo[2];
1053 _ssSetNumInputPorts(childS, 2);
1054 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
1055
1056 /* port 0 */
1057 {
1058 static real32_T const *sfcnUPtrs[1];
1059 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
1060 ssGetLocalBlockIO(rts))->GeneratedSFunction_n;
1061 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
1062 _ssSetInputPortNumDimensions(childS, 0, 1);
1063 ssSetInputPortWidth(childS, 0, 1);
1064 }
1065
1066 /* port 1 */
1067 {
1068 static real32_T const *sfcnUPtrs[1];
1069 sfcnUPtrs[0] = (real32_T const *)
1070 &AFCS_MODEL1_ConstP.Constant2_Value_c;
1071 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
1072 _ssSetInputPortNumDimensions(childS, 1, 1);
1073 ssSetInputPortWidth(childS, 1, 1);
1074 }
1075 }
1076
1077 /* outputs */
1078 {
1079 static struct _ssPortOutputs outputPortInfo[1];
1080 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
1081 _ssSetNumOutputPorts(childS, 1);
1082
1083 /* port 0 */
1084 {
1085 _ssSetOutputPortNumDimensions(childS, 0, 1);
1086 ssSetOutputPortWidth(childS, 0, 1);
1087 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
1088 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_j));
1089 }
1090 }
1091
1092 /* path info */
1093 _ssSetModelName(childS, "Gain_sf");
1094 _ssSetPath(childS,
1095 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/apthrustLcontrol/VtControl/gain1/Generated S-Function");
1096 if (ssGetRTModel(rts) == (NULL)) {
1097 _ssSetParentSS(childS, rts);
1098 _ssSetRootSS(childS, ssGetRootSS(rts));
1099 } else {
1100 ssSetRTModel(childS,ssGetRTModel(rts));
1101 _ssSetParentSS(childS, (NULL));
1102 _ssSetRootSS(childS, childS);
1103 }
1104
1105 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
1106
1107 /* registration */
1108 Gain_sf(childS);
1109 sfcnInitializeSizes(childS);
1110 sfcnInitializeSampleTimes(childS);
1111
1112 /* adjust sample time */
1113 ssSetSampleTime(childS, 0, 0.0);
1114 ssSetOffsetTime(childS, 0, 0.0);
1115 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
1116
1117 /* set compiled values of dynamic vector attributes */
1118 ssSetNumNonsampledZCs(childS, 0);
1119
1120 /* Update connectivity flags for each port */
1121 _ssSetInputPortConnected(childS, 0, 1);
1122 _ssSetInputPortConnected(childS, 1, 1);
1123 _ssSetOutputPortConnected(childS, 0, 1);
1124 _ssSetOutputPortBeingMerged(childS, 0, 0);
1125
1126 /* Update the BufferDstPort flags for each input port */
1127 _ssSetInputPortBufferDstPort(childS, 0, -1);
1128 _ssSetInputPortBufferDstPort(childS, 1, -1);
1129
1130 /* Instance data for generated S-Function: Gain */
1131 {
1132 SimStruct *rts = childS;
1133
1134#include "Gain_sfcn_rtw/Gain_sid.h"
1135
1136 }
1137 }
1138
1139 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S184>/Generated S-Function (IntegratorLimited_sf) */
1140 {
1141 SimStruct *childS = ssGetSFunction(rts, 6);
1142
1143 /* timing info */
1144 static time_T sfcnPeriod[1];
1145 static time_T sfcnOffset[1];
1146 static int_T sfcnTsMap[1];
1147 (void) memset((void*)sfcnPeriod, 0,
1148 sizeof(time_T)*1);
1149 (void) memset((void*)sfcnOffset, 0,
1150 sizeof(time_T)*1);
1151 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
1152 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
1153 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
1154
1155 /* Set up the mdlInfo pointer */
1156# ifdef USE_RTMODEL
1157
1158 {
1159 static struct _ssBlkInfo2 _blkInfo2;
1160 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
1161 ssSetBlkInfo2Ptr(childS, blkInfo2);
1162 }
1163
1164 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
1165
1166# else
1167
1168 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
1169
1170# endif /* USE_RTMODEL */
1171
1172 /* Allocate memory of model methods 2 */
1173 {
1174 static struct _ssSFcnModelMethods2 methods2;
1175 ssSetModelMethods2(childS, &methods2);
1176 }
1177
1178 /* Allocate memory of model methods 3 */
1179 {
1180 static struct _ssSFcnModelMethods3 methods3;
1181 ssSetModelMethods3(childS, &methods3);
1182 }
1183
1184 /* Allocate memory for states auxilliary information */
1185 {
1186 static struct _ssStatesInfo2 statesInfo2;
1187 static ssPeriodicStatesInfo periodicStatesInfo;
1188 ssSetStatesInfo2(childS, &statesInfo2);
1189 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
1190 }
1191
1192 /* inputs */
1193 {
1194 static struct _ssPortInputs inputPortInfo[7];
1195 _ssSetNumInputPorts(childS, 7);
1196 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
1197
1198 /* port 0 */
1199 {
1200 static real32_T const *sfcnUPtrs[1];
1201 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
1202 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReuseS;
1203 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
1204 _ssSetInputPortNumDimensions(childS, 0, 1);
1205 ssSetInputPortWidth(childS, 0, 1);
1206 }
1207
1208 /* port 1 */
1209 {
1210 static int8_T const *sfcnUPtrs[1];
1211 sfcnUPtrs[0] = (int8_T const *) &((B_AFCS_MODEL1_T *)
1212 ssGetLocalBlockIO(rts))->DataTypeConversion1_j;
1213 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
1214 _ssSetInputPortNumDimensions(childS, 1, 1);
1215 ssSetInputPortWidth(childS, 1, 1);
1216 }
1217
1218 /* port 2 */
1219 {
1220 static real32_T const *sfcnUPtrs[1];
1221 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
1222 ssGetLocalBlockIO(rts))->Add2;
1223 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
1224 _ssSetInputPortNumDimensions(childS, 2, 1);
1225 ssSetInputPortWidth(childS, 2, 1);
1226 }
1227
1228 /* port 3 */
1229 {
1230 static real32_T const *sfcnUPtrs[1];
1231 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
1232 ssGetLocalBlockIO(rts))->Add2;
1233 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
1234 _ssSetInputPortNumDimensions(childS, 3, 1);
1235 ssSetInputPortWidth(childS, 3, 1);
1236 }
1237
1238 /* port 4 */
1239 {
1240 static real32_T const *sfcnUPtrs[1];
1241 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
1242 ssGetLocalBlockIO(rts))->Add_g1;
1243 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
1244 _ssSetInputPortNumDimensions(childS, 4, 1);
1245 ssSetInputPortWidth(childS, 4, 1);
1246 }
1247
1248 /* port 5 */
1249 {
1250 static real32_T const *sfcnUPtrs[1];
1251 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
1252 ssGetLocalBlockIO(rts))->Add1;
1253 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
1254 _ssSetInputPortNumDimensions(childS, 5, 1);
1255 ssSetInputPortWidth(childS, 5, 1);
1256 }
1257
1258 /* port 6 */
1259 {
1260 static real32_T const *sfcnUPtrs[1];
1261 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
1262 ssGetLocalBlockIO(rts))->GeneratedSFunction_j;
1263 _ssSetInputPortSignalPtrs(childS, 6, (InputPtrsType)&sfcnUPtrs[0]);
1264 _ssSetInputPortNumDimensions(childS, 6, 1);
1265 ssSetInputPortWidth(childS, 6, 1);
1266 }
1267 }
1268
1269 /* outputs */
1270 {
1271 static struct _ssPortOutputs outputPortInfo[1];
1272 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
1273 _ssSetNumOutputPorts(childS, 1);
1274
1275 /* port 0 */
1276 {
1277 _ssSetOutputPortNumDimensions(childS, 0, 1);
1278 ssSetOutputPortWidth(childS, 0, 1);
1279 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
1280 *) ssGetLocalBlockIO(rts))->Product1_g));
1281 }
1282 }
1283
1284 /* path info */
1285 _ssSetModelName(childS, "IntegratorLimited_sf");
1286 _ssSetPath(childS,
1287 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/apthrustLcontrol/VtControl/Integrator Limited/Generated S-Function");
1288 if (ssGetRTModel(rts) == (NULL)) {
1289 _ssSetParentSS(childS, rts);
1290 _ssSetRootSS(childS, ssGetRootSS(rts));
1291 } else {
1292 ssSetRTModel(childS,ssGetRTModel(rts));
1293 _ssSetParentSS(childS, (NULL));
1294 _ssSetRootSS(childS, childS);
1295 }
1296
1297 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
1298
1299 /* work vectors */
1300 {
1301 static struct _ssDWorkRecord dWorkRecord[4];
1302 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
1303 ssSetSFcnDWork(childS, dWorkRecord);
1304 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
1305 _ssSetNumDWork(childS, 4);
1306
1307 /* DWORK0 */
1308 ssSetDWorkWidth(childS, 0, 1);
1309 ssSetDWorkDataType(childS, 0,SS_SINGLE);
1310 ssSetDWorkComplexSignal(childS, 0, 0);
1311 ssSetDWorkUsedAsDState(childS, 0, 1);
1312 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 151))[0]);
1313
1314 /* DWORK1 */
1315 ssSetDWorkWidth(childS, 1, 1);
1316 ssSetDWorkDataType(childS, 1,SS_SINGLE);
1317 ssSetDWorkComplexSignal(childS, 1, 0);
1318 ssSetDWorkUsedAsDState(childS, 1, 1);
1319 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 152))[0]);
1320
1321 /* DWORK2 */
1322 ssSetDWorkWidth(childS, 2, 1);
1323 ssSetDWorkDataType(childS, 2,SS_INT8);
1324 ssSetDWorkComplexSignal(childS, 2, 0);
1325 ssSetDWorkUsedAsDState(childS, 2, 1);
1326 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 378))[0]);
1327
1328 /* DWORK3 */
1329 ssSetDWorkWidth(childS, 3, 1);
1330 ssSetDWorkDataType(childS, 3,SS_INT8);
1331 ssSetDWorkComplexSignal(childS, 3, 0);
1332 ssSetDWorkUsedAsDState(childS, 3, 1);
1333 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 379))[0]);
1334 }
1335
1336 /* registration */
1337 IntegratorLimited_sf(childS);
1338 sfcnInitializeSizes(childS);
1339 sfcnInitializeSampleTimes(childS);
1340
1341 /* adjust sample time */
1342 ssSetSampleTime(childS, 0, 0.0);
1343 ssSetOffsetTime(childS, 0, 0.0);
1344 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
1345
1346 /* set compiled values of dynamic vector attributes */
1347 ssSetNumNonsampledZCs(childS, 0);
1348
1349 /* Update connectivity flags for each port */
1350 _ssSetInputPortConnected(childS, 0, 1);
1351 _ssSetInputPortConnected(childS, 1, 1);
1352 _ssSetInputPortConnected(childS, 2, 1);
1353 _ssSetInputPortConnected(childS, 3, 1);
1354 _ssSetInputPortConnected(childS, 4, 1);
1355 _ssSetInputPortConnected(childS, 5, 1);
1356 _ssSetInputPortConnected(childS, 6, 1);
1357 _ssSetOutputPortConnected(childS, 0, 1);
1358 _ssSetOutputPortBeingMerged(childS, 0, 0);
1359
1360 /* Update the BufferDstPort flags for each input port */
1361 _ssSetInputPortBufferDstPort(childS, 0, -1);
1362 _ssSetInputPortBufferDstPort(childS, 1, -1);
1363 _ssSetInputPortBufferDstPort(childS, 2, -1);
1364 _ssSetInputPortBufferDstPort(childS, 3, -1);
1365 _ssSetInputPortBufferDstPort(childS, 4, -1);
1366 _ssSetInputPortBufferDstPort(childS, 5, -1);
1367 _ssSetInputPortBufferDstPort(childS, 6, -1);
1368
1369 /* Instance data for generated S-Function: IntegratorLimited */
1370 {
1371 SimStruct *rts = childS;
1372
1373#include "IntegratorLimited_sfcn_rtw/IntegratorLimited_sid.h"
1374
1375 }
1376 }
1377
1378 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S183>/Generated S-Function (LagFilter_sf) */
1379 {
1380 SimStruct *childS = ssGetSFunction(rts, 7);
1381
1382 /* timing info */
1383 static time_T sfcnPeriod[1];
1384 static time_T sfcnOffset[1];
1385 static int_T sfcnTsMap[1];
1386 (void) memset((void*)sfcnPeriod, 0,
1387 sizeof(time_T)*1);
1388 (void) memset((void*)sfcnOffset, 0,
1389 sizeof(time_T)*1);
1390 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
1391 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
1392 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
1393
1394 /* Set up the mdlInfo pointer */
1395# ifdef USE_RTMODEL
1396
1397 {
1398 static struct _ssBlkInfo2 _blkInfo2;
1399 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
1400 ssSetBlkInfo2Ptr(childS, blkInfo2);
1401 }
1402
1403 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
1404
1405# else
1406
1407 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
1408
1409# endif /* USE_RTMODEL */
1410
1411 /* Allocate memory of model methods 2 */
1412 {
1413 static struct _ssSFcnModelMethods2 methods2;
1414 ssSetModelMethods2(childS, &methods2);
1415 }
1416
1417 /* Allocate memory of model methods 3 */
1418 {
1419 static struct _ssSFcnModelMethods3 methods3;
1420 ssSetModelMethods3(childS, &methods3);
1421 }
1422
1423 /* Allocate memory for states auxilliary information */
1424 {
1425 static struct _ssStatesInfo2 statesInfo2;
1426 static ssPeriodicStatesInfo periodicStatesInfo;
1427 ssSetStatesInfo2(childS, &statesInfo2);
1428 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
1429 }
1430
1431 /* inputs */
1432 {
1433 static struct _ssPortInputs inputPortInfo[6];
1434 _ssSetNumInputPorts(childS, 6);
1435 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
1436
1437 /* port 0 */
1438 {
1439 static real32_T const *sfcnUPtrs[1];
1440 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
1441 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReuseS;
1442 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
1443 _ssSetInputPortNumDimensions(childS, 0, 1);
1444 ssSetInputPortWidth(childS, 0, 1);
1445 }
1446
1447 /* port 1 */
1448 {
1449 static int8_T const *sfcnUPtrs[1];
1450 sfcnUPtrs[0] = (int8_T const *) &((B_AFCS_MODEL1_T *)
1451 ssGetLocalBlockIO(rts))->DataTypeConversion1_j;
1452 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
1453 _ssSetInputPortNumDimensions(childS, 1, 1);
1454 ssSetInputPortWidth(childS, 1, 1);
1455 }
1456
1457 /* port 2 */
1458 {
1459 static real32_T const *sfcnUPtrs[1];
1460 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled107;
1461 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
1462 _ssSetInputPortNumDimensions(childS, 2, 1);
1463 ssSetInputPortWidth(childS, 2, 1);
1464 }
1465
1466 /* port 3 */
1467 {
1468 static real32_T const *sfcnUPtrs[1];
1469 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
1470 ssGetLocalBlockIO(rts))->Switch_k;
1471 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
1472 _ssSetInputPortNumDimensions(childS, 3, 1);
1473 ssSetInputPortWidth(childS, 3, 1);
1474 }
1475
1476 /* port 4 */
1477 {
1478 static real32_T const *sfcnUPtrs[1];
1479 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
1480 ssGetLocalBlockIO(rts))->Switch_k;
1481 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
1482 _ssSetInputPortNumDimensions(childS, 4, 1);
1483 ssSetInputPortWidth(childS, 4, 1);
1484 }
1485
1486 /* port 5 */
1487 {
1488 static real32_T const *sfcnUPtrs[1];
1489 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
1490 ssGetLocalBlockIO(rts))->Sum1_b;
1491 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
1492 _ssSetInputPortNumDimensions(childS, 5, 1);
1493 ssSetInputPortWidth(childS, 5, 1);
1494 }
1495 }
1496
1497 /* outputs */
1498 {
1499 static struct _ssPortOutputs outputPortInfo[1];
1500 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
1501 _ssSetNumOutputPorts(childS, 1);
1502
1503 /* port 0 */
1504 {
1505 _ssSetOutputPortNumDimensions(childS, 0, 1);
1506 ssSetOutputPortWidth(childS, 0, 1);
1507 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
1508 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_k));
1509 }
1510 }
1511
1512 /* path info */
1513 _ssSetModelName(childS, "LagFilter_sf");
1514 _ssSetPath(childS,
1515 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/apthrustLcontrol/VtControl/ lag filter/Generated S-Function");
1516 if (ssGetRTModel(rts) == (NULL)) {
1517 _ssSetParentSS(childS, rts);
1518 _ssSetRootSS(childS, ssGetRootSS(rts));
1519 } else {
1520 ssSetRTModel(childS,ssGetRTModel(rts));
1521 _ssSetParentSS(childS, (NULL));
1522 _ssSetRootSS(childS, childS);
1523 }
1524
1525 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
1526
1527 /* work vectors */
1528 {
1529 static struct _ssDWorkRecord dWorkRecord[4];
1530 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
1531 ssSetSFcnDWork(childS, dWorkRecord);
1532 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
1533 _ssSetNumDWork(childS, 4);
1534
1535 /* DWORK0 */
1536 ssSetDWorkWidth(childS, 0, 1);
1537 ssSetDWorkDataType(childS, 0,SS_SINGLE);
1538 ssSetDWorkComplexSignal(childS, 0, 0);
1539 ssSetDWorkUsedAsDState(childS, 0, 1);
1540 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 153))[0]);
1541
1542 /* DWORK1 */
1543 ssSetDWorkWidth(childS, 1, 1);
1544 ssSetDWorkDataType(childS, 1,SS_SINGLE);
1545 ssSetDWorkComplexSignal(childS, 1, 0);
1546 ssSetDWorkUsedAsDState(childS, 1, 1);
1547 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 154))[0]);
1548
1549 /* DWORK2 */
1550 ssSetDWorkWidth(childS, 2, 1);
1551 ssSetDWorkDataType(childS, 2,SS_INT8);
1552 ssSetDWorkComplexSignal(childS, 2, 0);
1553 ssSetDWorkUsedAsDState(childS, 2, 1);
1554 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 380))[0]);
1555
1556 /* DWORK3 */
1557 ssSetDWorkWidth(childS, 3, 1);
1558 ssSetDWorkDataType(childS, 3,SS_INT8);
1559 ssSetDWorkComplexSignal(childS, 3, 0);
1560 ssSetDWorkUsedAsDState(childS, 3, 1);
1561 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 381))[0]);
1562 }
1563
1564 /* registration */
1565 LagFilter_sf(childS);
1566 sfcnInitializeSizes(childS);
1567 sfcnInitializeSampleTimes(childS);
1568
1569 /* adjust sample time */
1570 ssSetSampleTime(childS, 0, 0.0);
1571 ssSetOffsetTime(childS, 0, 0.0);
1572 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
1573
1574 /* set compiled values of dynamic vector attributes */
1575 ssSetNumNonsampledZCs(childS, 0);
1576
1577 /* Update connectivity flags for each port */
1578 _ssSetInputPortConnected(childS, 0, 1);
1579 _ssSetInputPortConnected(childS, 1, 1);
1580 _ssSetInputPortConnected(childS, 2, 1);
1581 _ssSetInputPortConnected(childS, 3, 1);
1582 _ssSetInputPortConnected(childS, 4, 1);
1583 _ssSetInputPortConnected(childS, 5, 1);
1584 _ssSetOutputPortConnected(childS, 0, 1);
1585 _ssSetOutputPortBeingMerged(childS, 0, 0);
1586
1587 /* Update the BufferDstPort flags for each input port */
1588 _ssSetInputPortBufferDstPort(childS, 0, -1);
1589 _ssSetInputPortBufferDstPort(childS, 1, -1);
1590 _ssSetInputPortBufferDstPort(childS, 2, -1);
1591 _ssSetInputPortBufferDstPort(childS, 3, -1);
1592 _ssSetInputPortBufferDstPort(childS, 4, -1);
1593 _ssSetInputPortBufferDstPort(childS, 5, -1);
1594
1595 /* Instance data for generated S-Function: LagFilter */
1596 {
1597 SimStruct *rts = childS;
1598
1599#include "LagFilter_sfcn_rtw/LagFilter_sid.h"
1600
1601 }
1602 }
1603
1604 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S179>/Generated S-Function (SaturationLimiter_sf) */
1605 {
1606 SimStruct *childS = ssGetSFunction(rts, 8);
1607
1608 /* timing info */
1609 static time_T sfcnPeriod[1];
1610 static time_T sfcnOffset[1];
1611 static int_T sfcnTsMap[1];
1612 (void) memset((void*)sfcnPeriod, 0,
1613 sizeof(time_T)*1);
1614 (void) memset((void*)sfcnOffset, 0,
1615 sizeof(time_T)*1);
1616 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
1617 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
1618 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
1619
1620 /* Set up the mdlInfo pointer */
1621# ifdef USE_RTMODEL
1622
1623 {
1624 static struct _ssBlkInfo2 _blkInfo2;
1625 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
1626 ssSetBlkInfo2Ptr(childS, blkInfo2);
1627 }
1628
1629 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
1630
1631# else
1632
1633 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
1634
1635# endif /* USE_RTMODEL */
1636
1637 /* Allocate memory of model methods 2 */
1638 {
1639 static struct _ssSFcnModelMethods2 methods2;
1640 ssSetModelMethods2(childS, &methods2);
1641 }
1642
1643 /* Allocate memory of model methods 3 */
1644 {
1645 static struct _ssSFcnModelMethods3 methods3;
1646 ssSetModelMethods3(childS, &methods3);
1647 }
1648
1649 /* Allocate memory for states auxilliary information */
1650 {
1651 static struct _ssStatesInfo2 statesInfo2;
1652 static ssPeriodicStatesInfo periodicStatesInfo;
1653 ssSetStatesInfo2(childS, &statesInfo2);
1654 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
1655 }
1656
1657 /* inputs */
1658 {
1659 static struct _ssPortInputs inputPortInfo[3];
1660 _ssSetNumInputPorts(childS, 3);
1661 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
1662
1663 /* port 0 */
1664 {
1665 static real32_T const *sfcnUPtrs[1];
1666 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
1667 ssGetLocalBlockIO(rts))->Sum_mj;
1668 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
1669 _ssSetInputPortNumDimensions(childS, 0, 1);
1670 ssSetInputPortWidth(childS, 0, 1);
1671 }
1672
1673 /* port 1 */
1674 {
1675 static real32_T const *sfcnUPtrs[1];
1676 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled111;
1677 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
1678 _ssSetInputPortNumDimensions(childS, 1, 1);
1679 ssSetInputPortWidth(childS, 1, 1);
1680 }
1681
1682 /* port 2 */
1683 {
1684 static real32_T const *sfcnUPtrs[1];
1685 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled112;
1686 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
1687 _ssSetInputPortNumDimensions(childS, 2, 1);
1688 ssSetInputPortWidth(childS, 2, 1);
1689 }
1690 }
1691
1692 /* outputs */
1693 {
1694 static struct _ssPortOutputs outputPortInfo[1];
1695 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
1696 _ssSetNumOutputPorts(childS, 1);
1697
1698 /* port 0 */
1699 {
1700 _ssSetOutputPortNumDimensions(childS, 0, 1);
1701 ssSetOutputPortWidth(childS, 0, 1);
1702 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
1703 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_g));
1704 }
1705 }
1706
1707 /* path info */
1708 _ssSetModelName(childS, "SaturationLimiter_sf");
1709 _ssSetPath(childS,
1710 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/apthrustLcontrol/VcControl/Saturation Limiter1/Generated S-Function");
1711 if (ssGetRTModel(rts) == (NULL)) {
1712 _ssSetParentSS(childS, rts);
1713 _ssSetRootSS(childS, ssGetRootSS(rts));
1714 } else {
1715 ssSetRTModel(childS,ssGetRTModel(rts));
1716 _ssSetParentSS(childS, (NULL));
1717 _ssSetRootSS(childS, childS);
1718 }
1719
1720 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
1721
1722 /* registration */
1723 SaturationLimiter_sf(childS);
1724 sfcnInitializeSizes(childS);
1725 sfcnInitializeSampleTimes(childS);
1726
1727 /* adjust sample time */
1728 ssSetSampleTime(childS, 0, 0.0);
1729 ssSetOffsetTime(childS, 0, 0.0);
1730 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
1731
1732 /* set compiled values of dynamic vector attributes */
1733 ssSetNumNonsampledZCs(childS, 0);
1734
1735 /* Update connectivity flags for each port */
1736 _ssSetInputPortConnected(childS, 0, 1);
1737 _ssSetInputPortConnected(childS, 1, 1);
1738 _ssSetInputPortConnected(childS, 2, 1);
1739 _ssSetOutputPortConnected(childS, 0, 1);
1740 _ssSetOutputPortBeingMerged(childS, 0, 0);
1741
1742 /* Update the BufferDstPort flags for each input port */
1743 _ssSetInputPortBufferDstPort(childS, 0, -1);
1744 _ssSetInputPortBufferDstPort(childS, 1, -1);
1745 _ssSetInputPortBufferDstPort(childS, 2, -1);
1746
1747 /* Instance data for generated S-Function: SaturationLimiter */
1748 {
1749 SimStruct *rts = childS;
1750
1751#include "SaturationLimiter_sfcn_rtw/SaturationLimiter_sid.h"
1752
1753 }
1754 }
1755
1756 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S181>/Generated S-Function (Gain_sf) */
1757 {
1758 SimStruct *childS = ssGetSFunction(rts, 9);
1759
1760 /* timing info */
1761 static time_T sfcnPeriod[1];
1762 static time_T sfcnOffset[1];
1763 static int_T sfcnTsMap[1];
1764 (void) memset((void*)sfcnPeriod, 0,
1765 sizeof(time_T)*1);
1766 (void) memset((void*)sfcnOffset, 0,
1767 sizeof(time_T)*1);
1768 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
1769 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
1770 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
1771
1772 /* Set up the mdlInfo pointer */
1773# ifdef USE_RTMODEL
1774
1775 {
1776 static struct _ssBlkInfo2 _blkInfo2;
1777 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
1778 ssSetBlkInfo2Ptr(childS, blkInfo2);
1779 }
1780
1781 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
1782
1783# else
1784
1785 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
1786
1787# endif /* USE_RTMODEL */
1788
1789 /* Allocate memory of model methods 2 */
1790 {
1791 static struct _ssSFcnModelMethods2 methods2;
1792 ssSetModelMethods2(childS, &methods2);
1793 }
1794
1795 /* Allocate memory of model methods 3 */
1796 {
1797 static struct _ssSFcnModelMethods3 methods3;
1798 ssSetModelMethods3(childS, &methods3);
1799 }
1800
1801 /* Allocate memory for states auxilliary information */
1802 {
1803 static struct _ssStatesInfo2 statesInfo2;
1804 static ssPeriodicStatesInfo periodicStatesInfo;
1805 ssSetStatesInfo2(childS, &statesInfo2);
1806 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
1807 }
1808
1809 /* inputs */
1810 {
1811 static struct _ssPortInputs inputPortInfo[2];
1812 _ssSetNumInputPorts(childS, 2);
1813 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
1814
1815 /* port 0 */
1816 {
1817 static real32_T const *sfcnUPtrs[1];
1818 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
1819 ssGetLocalBlockIO(rts))->GeneratedSFunction_g;
1820 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
1821 _ssSetInputPortNumDimensions(childS, 0, 1);
1822 ssSetInputPortWidth(childS, 0, 1);
1823 }
1824
1825 /* port 1 */
1826 {
1827 static real32_T const *sfcnUPtrs[1];
1828 sfcnUPtrs[0] = (real32_T const *)
1829 &AFCS_MODEL1_ConstP.Constant1_Value_i;
1830 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
1831 _ssSetInputPortNumDimensions(childS, 1, 1);
1832 ssSetInputPortWidth(childS, 1, 1);
1833 }
1834 }
1835
1836 /* outputs */
1837 {
1838 static struct _ssPortOutputs outputPortInfo[1];
1839 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
1840 _ssSetNumOutputPorts(childS, 1);
1841
1842 /* port 0 */
1843 {
1844 _ssSetOutputPortNumDimensions(childS, 0, 1);
1845 ssSetOutputPortWidth(childS, 0, 1);
1846 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
1847 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_j5));
1848 }
1849 }
1850
1851 /* path info */
1852 _ssSetModelName(childS, "Gain_sf");
1853 _ssSetPath(childS,
1854 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/apthrustLcontrol/VcControl/gain/Generated S-Function");
1855 if (ssGetRTModel(rts) == (NULL)) {
1856 _ssSetParentSS(childS, rts);
1857 _ssSetRootSS(childS, ssGetRootSS(rts));
1858 } else {
1859 ssSetRTModel(childS,ssGetRTModel(rts));
1860 _ssSetParentSS(childS, (NULL));
1861 _ssSetRootSS(childS, childS);
1862 }
1863
1864 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
1865
1866 /* registration */
1867 Gain_sf(childS);
1868 sfcnInitializeSizes(childS);
1869 sfcnInitializeSampleTimes(childS);
1870
1871 /* adjust sample time */
1872 ssSetSampleTime(childS, 0, 0.0);
1873 ssSetOffsetTime(childS, 0, 0.0);
1874 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
1875
1876 /* set compiled values of dynamic vector attributes */
1877 ssSetNumNonsampledZCs(childS, 0);
1878
1879 /* Update connectivity flags for each port */
1880 _ssSetInputPortConnected(childS, 0, 1);
1881 _ssSetInputPortConnected(childS, 1, 1);
1882 _ssSetOutputPortConnected(childS, 0, 1);
1883 _ssSetOutputPortBeingMerged(childS, 0, 0);
1884
1885 /* Update the BufferDstPort flags for each input port */
1886 _ssSetInputPortBufferDstPort(childS, 0, -1);
1887 _ssSetInputPortBufferDstPort(childS, 1, -1);
1888
1889 /* Instance data for generated S-Function: Gain */
1890 {
1891 SimStruct *rts = childS;
1892
1893#include "Gain_sfcn_rtw/Gain_sid.h"
1894
1895 }
1896 }
1897
1898 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S178>/Generated S-Function (LeadLagFilter_sf) */
1899 {
1900 SimStruct *childS = ssGetSFunction(rts, 10);
1901
1902 /* timing info */
1903 static time_T sfcnPeriod[1];
1904 static time_T sfcnOffset[1];
1905 static int_T sfcnTsMap[1];
1906 (void) memset((void*)sfcnPeriod, 0,
1907 sizeof(time_T)*1);
1908 (void) memset((void*)sfcnOffset, 0,
1909 sizeof(time_T)*1);
1910 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
1911 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
1912 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
1913
1914 /* Set up the mdlInfo pointer */
1915# ifdef USE_RTMODEL
1916
1917 {
1918 static struct _ssBlkInfo2 _blkInfo2;
1919 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
1920 ssSetBlkInfo2Ptr(childS, blkInfo2);
1921 }
1922
1923 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
1924
1925# else
1926
1927 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
1928
1929# endif /* USE_RTMODEL */
1930
1931 /* Allocate memory of model methods 2 */
1932 {
1933 static struct _ssSFcnModelMethods2 methods2;
1934 ssSetModelMethods2(childS, &methods2);
1935 }
1936
1937 /* Allocate memory of model methods 3 */
1938 {
1939 static struct _ssSFcnModelMethods3 methods3;
1940 ssSetModelMethods3(childS, &methods3);
1941 }
1942
1943 /* Allocate memory for states auxilliary information */
1944 {
1945 static struct _ssStatesInfo2 statesInfo2;
1946 static ssPeriodicStatesInfo periodicStatesInfo;
1947 ssSetStatesInfo2(childS, &statesInfo2);
1948 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
1949 }
1950
1951 /* inputs */
1952 {
1953 static struct _ssPortInputs inputPortInfo[7];
1954 _ssSetNumInputPorts(childS, 7);
1955 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
1956
1957 /* port 0 */
1958 {
1959 static real32_T const *sfcnUPtrs[1];
1960 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
1961 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReuseS;
1962 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
1963 _ssSetInputPortNumDimensions(childS, 0, 1);
1964 ssSetInputPortWidth(childS, 0, 1);
1965 }
1966
1967 /* port 1 */
1968 {
1969 static int8_T const *sfcnUPtrs[1];
1970 sfcnUPtrs[0] = (int8_T const *) &((B_AFCS_MODEL1_T *)
1971 ssGetLocalBlockIO(rts))->DataTypeConversion2_lt;
1972 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
1973 _ssSetInputPortNumDimensions(childS, 1, 1);
1974 ssSetInputPortWidth(childS, 1, 1);
1975 }
1976
1977 /* port 2 */
1978 {
1979 static real32_T const *sfcnUPtrs[1];
1980 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled105;
1981 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
1982 _ssSetInputPortNumDimensions(childS, 2, 1);
1983 ssSetInputPortWidth(childS, 2, 1);
1984 }
1985
1986 /* port 3 */
1987 {
1988 static real32_T const *sfcnUPtrs[1];
1989 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled105;
1990 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
1991 _ssSetInputPortNumDimensions(childS, 3, 1);
1992 ssSetInputPortWidth(childS, 3, 1);
1993 }
1994
1995 /* port 4 */
1996 {
1997 static real32_T const *sfcnUPtrs[1];
1998 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
1999 ssGetLocalBlockIO(rts))->Switch_k;
2000 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
2001 _ssSetInputPortNumDimensions(childS, 4, 1);
2002 ssSetInputPortWidth(childS, 4, 1);
2003 }
2004
2005 /* port 5 */
2006 {
2007 static real32_T const *sfcnUPtrs[1];
2008 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
2009 ssGetLocalBlockIO(rts))->Switch_k;
2010 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
2011 _ssSetInputPortNumDimensions(childS, 5, 1);
2012 ssSetInputPortWidth(childS, 5, 1);
2013 }
2014
2015 /* port 6 */
2016 {
2017 static real32_T const *sfcnUPtrs[1];
2018 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
2019 ssGetLocalBlockIO(rts))->GeneratedSFunction_j5;
2020 _ssSetInputPortSignalPtrs(childS, 6, (InputPtrsType)&sfcnUPtrs[0]);
2021 _ssSetInputPortNumDimensions(childS, 6, 1);
2022 ssSetInputPortWidth(childS, 6, 1);
2023 }
2024 }
2025
2026 /* outputs */
2027 {
2028 static struct _ssPortOutputs outputPortInfo[1];
2029 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
2030 _ssSetNumOutputPorts(childS, 1);
2031
2032 /* port 0 */
2033 {
2034 _ssSetOutputPortNumDimensions(childS, 0, 1);
2035 ssSetOutputPortWidth(childS, 0, 1);
2036 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
2037 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_e));
2038 }
2039 }
2040
2041 /* path info */
2042 _ssSetModelName(childS, "LeadLagFilter_sf");
2043 _ssSetPath(childS,
2044 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/apthrustLcontrol/VcControl/Lead lag/Generated S-Function");
2045 if (ssGetRTModel(rts) == (NULL)) {
2046 _ssSetParentSS(childS, rts);
2047 _ssSetRootSS(childS, ssGetRootSS(rts));
2048 } else {
2049 ssSetRTModel(childS,ssGetRTModel(rts));
2050 _ssSetParentSS(childS, (NULL));
2051 _ssSetRootSS(childS, childS);
2052 }
2053
2054 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
2055
2056 /* work vectors */
2057 {
2058 static struct _ssDWorkRecord dWorkRecord[4];
2059 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
2060 ssSetSFcnDWork(childS, dWorkRecord);
2061 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
2062 _ssSetNumDWork(childS, 4);
2063
2064 /* DWORK0 */
2065 ssSetDWorkWidth(childS, 0, 1);
2066 ssSetDWorkDataType(childS, 0,SS_SINGLE);
2067 ssSetDWorkComplexSignal(childS, 0, 0);
2068 ssSetDWorkUsedAsDState(childS, 0, 1);
2069 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 155))[0]);
2070
2071 /* DWORK1 */
2072 ssSetDWorkWidth(childS, 1, 1);
2073 ssSetDWorkDataType(childS, 1,SS_SINGLE);
2074 ssSetDWorkComplexSignal(childS, 1, 0);
2075 ssSetDWorkUsedAsDState(childS, 1, 1);
2076 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 156))[0]);
2077
2078 /* DWORK2 */
2079 ssSetDWorkWidth(childS, 2, 1);
2080 ssSetDWorkDataType(childS, 2,SS_INT8);
2081 ssSetDWorkComplexSignal(childS, 2, 0);
2082 ssSetDWorkUsedAsDState(childS, 2, 1);
2083 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 382))[0]);
2084
2085 /* DWORK3 */
2086 ssSetDWorkWidth(childS, 3, 1);
2087 ssSetDWorkDataType(childS, 3,SS_INT8);
2088 ssSetDWorkComplexSignal(childS, 3, 0);
2089 ssSetDWorkUsedAsDState(childS, 3, 1);
2090 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 383))[0]);
2091 }
2092
2093 /* registration */
2094 LeadLagFilter_sf(childS);
2095 sfcnInitializeSizes(childS);
2096 sfcnInitializeSampleTimes(childS);
2097
2098 /* adjust sample time */
2099 ssSetSampleTime(childS, 0, 0.0);
2100 ssSetOffsetTime(childS, 0, 0.0);
2101 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
2102
2103 /* set compiled values of dynamic vector attributes */
2104 ssSetNumNonsampledZCs(childS, 0);
2105
2106 /* Update connectivity flags for each port */
2107 _ssSetInputPortConnected(childS, 0, 1);
2108 _ssSetInputPortConnected(childS, 1, 1);
2109 _ssSetInputPortConnected(childS, 2, 1);
2110 _ssSetInputPortConnected(childS, 3, 1);
2111 _ssSetInputPortConnected(childS, 4, 1);
2112 _ssSetInputPortConnected(childS, 5, 1);
2113 _ssSetInputPortConnected(childS, 6, 1);
2114 _ssSetOutputPortConnected(childS, 0, 1);
2115 _ssSetOutputPortBeingMerged(childS, 0, 0);
2116
2117 /* Update the BufferDstPort flags for each input port */
2118 _ssSetInputPortBufferDstPort(childS, 0, -1);
2119 _ssSetInputPortBufferDstPort(childS, 1, -1);
2120 _ssSetInputPortBufferDstPort(childS, 2, -1);
2121 _ssSetInputPortBufferDstPort(childS, 3, -1);
2122 _ssSetInputPortBufferDstPort(childS, 4, -1);
2123 _ssSetInputPortBufferDstPort(childS, 5, -1);
2124 _ssSetInputPortBufferDstPort(childS, 6, -1);
2125
2126 /* Instance data for generated S-Function: LeadLagFilter */
2127 {
2128 SimStruct *rts = childS;
2129
2130#include "LeadLagFilter_sfcn_rtw/LeadLagFilter_sid.h"
2131
2132 }
2133 }
2134
2135 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S180>/Generated S-Function (SaturationLimiter_sf) */
2136 {
2137 SimStruct *childS = ssGetSFunction(rts, 11);
2138
2139 /* timing info */
2140 static time_T sfcnPeriod[1];
2141 static time_T sfcnOffset[1];
2142 static int_T sfcnTsMap[1];
2143 (void) memset((void*)sfcnPeriod, 0,
2144 sizeof(time_T)*1);
2145 (void) memset((void*)sfcnOffset, 0,
2146 sizeof(time_T)*1);
2147 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
2148 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
2149 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
2150
2151 /* Set up the mdlInfo pointer */
2152# ifdef USE_RTMODEL
2153
2154 {
2155 static struct _ssBlkInfo2 _blkInfo2;
2156 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
2157 ssSetBlkInfo2Ptr(childS, blkInfo2);
2158 }
2159
2160 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
2161
2162# else
2163
2164 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
2165
2166# endif /* USE_RTMODEL */
2167
2168 /* Allocate memory of model methods 2 */
2169 {
2170 static struct _ssSFcnModelMethods2 methods2;
2171 ssSetModelMethods2(childS, &methods2);
2172 }
2173
2174 /* Allocate memory of model methods 3 */
2175 {
2176 static struct _ssSFcnModelMethods3 methods3;
2177 ssSetModelMethods3(childS, &methods3);
2178 }
2179
2180 /* Allocate memory for states auxilliary information */
2181 {
2182 static struct _ssStatesInfo2 statesInfo2;
2183 static ssPeriodicStatesInfo periodicStatesInfo;
2184 ssSetStatesInfo2(childS, &statesInfo2);
2185 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
2186 }
2187
2188 /* inputs */
2189 {
2190 static struct _ssPortInputs inputPortInfo[3];
2191 _ssSetNumInputPorts(childS, 3);
2192 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
2193
2194 /* port 0 */
2195 {
2196 static real32_T const *sfcnUPtrs[1];
2197 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
2198 ssGetLocalBlockIO(rts))->GeneratedSFunction_e;
2199 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
2200 _ssSetInputPortNumDimensions(childS, 0, 1);
2201 ssSetInputPortWidth(childS, 0, 1);
2202 }
2203
2204 /* port 1 */
2205 {
2206 static real32_T const *sfcnUPtrs[1];
2207 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled109;
2208 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
2209 _ssSetInputPortNumDimensions(childS, 1, 1);
2210 ssSetInputPortWidth(childS, 1, 1);
2211 }
2212
2213 /* port 2 */
2214 {
2215 static real32_T const *sfcnUPtrs[1];
2216 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled110;
2217 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
2218 _ssSetInputPortNumDimensions(childS, 2, 1);
2219 ssSetInputPortWidth(childS, 2, 1);
2220 }
2221 }
2222
2223 /* outputs */
2224 {
2225 static struct _ssPortOutputs outputPortInfo[1];
2226 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
2227 _ssSetNumOutputPorts(childS, 1);
2228
2229 /* port 0 */
2230 {
2231 _ssSetOutputPortNumDimensions(childS, 0, 1);
2232 ssSetOutputPortWidth(childS, 0, 1);
2233 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
2234 *) ssGetLocalBlockIO(rts))->Product1_g));
2235 }
2236 }
2237
2238 /* path info */
2239 _ssSetModelName(childS, "SaturationLimiter_sf");
2240 _ssSetPath(childS,
2241 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/apthrustLcontrol/VcControl/Saturation Limiter3/Generated S-Function");
2242 if (ssGetRTModel(rts) == (NULL)) {
2243 _ssSetParentSS(childS, rts);
2244 _ssSetRootSS(childS, ssGetRootSS(rts));
2245 } else {
2246 ssSetRTModel(childS,ssGetRTModel(rts));
2247 _ssSetParentSS(childS, (NULL));
2248 _ssSetRootSS(childS, childS);
2249 }
2250
2251 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
2252
2253 /* registration */
2254 SaturationLimiter_sf(childS);
2255 sfcnInitializeSizes(childS);
2256 sfcnInitializeSampleTimes(childS);
2257
2258 /* adjust sample time */
2259 ssSetSampleTime(childS, 0, 0.0);
2260 ssSetOffsetTime(childS, 0, 0.0);
2261 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
2262
2263 /* set compiled values of dynamic vector attributes */
2264 ssSetNumNonsampledZCs(childS, 0);
2265
2266 /* Update connectivity flags for each port */
2267 _ssSetInputPortConnected(childS, 0, 1);
2268 _ssSetInputPortConnected(childS, 1, 1);
2269 _ssSetInputPortConnected(childS, 2, 1);
2270 _ssSetOutputPortConnected(childS, 0, 1);
2271 _ssSetOutputPortBeingMerged(childS, 0, 0);
2272
2273 /* Update the BufferDstPort flags for each input port */
2274 _ssSetInputPortBufferDstPort(childS, 0, -1);
2275 _ssSetInputPortBufferDstPort(childS, 1, -1);
2276 _ssSetInputPortBufferDstPort(childS, 2, -1);
2277
2278 /* Instance data for generated S-Function: SaturationLimiter */
2279 {
2280 SimStruct *rts = childS;
2281
2282#include "SaturationLimiter_sfcn_rtw/SaturationLimiter_sid.h"
2283
2284 }
2285 }
2286
2287 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S182>/Generated S-Function (Gain_sf) */
2288 {
2289 SimStruct *childS = ssGetSFunction(rts, 12);
2290
2291 /* timing info */
2292 static time_T sfcnPeriod[1];
2293 static time_T sfcnOffset[1];
2294 static int_T sfcnTsMap[1];
2295 (void) memset((void*)sfcnPeriod, 0,
2296 sizeof(time_T)*1);
2297 (void) memset((void*)sfcnOffset, 0,
2298 sizeof(time_T)*1);
2299 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
2300 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
2301 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
2302
2303 /* Set up the mdlInfo pointer */
2304# ifdef USE_RTMODEL
2305
2306 {
2307 static struct _ssBlkInfo2 _blkInfo2;
2308 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
2309 ssSetBlkInfo2Ptr(childS, blkInfo2);
2310 }
2311
2312 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
2313
2314# else
2315
2316 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
2317
2318# endif /* USE_RTMODEL */
2319
2320 /* Allocate memory of model methods 2 */
2321 {
2322 static struct _ssSFcnModelMethods2 methods2;
2323 ssSetModelMethods2(childS, &methods2);
2324 }
2325
2326 /* Allocate memory of model methods 3 */
2327 {
2328 static struct _ssSFcnModelMethods3 methods3;
2329 ssSetModelMethods3(childS, &methods3);
2330 }
2331
2332 /* Allocate memory for states auxilliary information */
2333 {
2334 static struct _ssStatesInfo2 statesInfo2;
2335 static ssPeriodicStatesInfo periodicStatesInfo;
2336 ssSetStatesInfo2(childS, &statesInfo2);
2337 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
2338 }
2339
2340 /* inputs */
2341 {
2342 static struct _ssPortInputs inputPortInfo[2];
2343 _ssSetNumInputPorts(childS, 2);
2344 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
2345
2346 /* port 0 */
2347 {
2348 static real32_T const *sfcnUPtrs[1];
2349 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
2350 ssGetLocalBlockIO(rts))->GeneratedSFunction_e;
2351 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
2352 _ssSetInputPortNumDimensions(childS, 0, 1);
2353 ssSetInputPortWidth(childS, 0, 1);
2354 }
2355
2356 /* port 1 */
2357 {
2358 static real32_T const *sfcnUPtrs[1];
2359 sfcnUPtrs[0] = (real32_T const *)
2360 &AFCS_MODEL1_ConstP.Constant2_Value_c;
2361 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
2362 _ssSetInputPortNumDimensions(childS, 1, 1);
2363 ssSetInputPortWidth(childS, 1, 1);
2364 }
2365 }
2366
2367 /* outputs */
2368 {
2369 static struct _ssPortOutputs outputPortInfo[1];
2370 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
2371 _ssSetNumOutputPorts(childS, 1);
2372
2373 /* port 0 */
2374 {
2375 _ssSetOutputPortNumDimensions(childS, 0, 1);
2376 ssSetOutputPortWidth(childS, 0, 1);
2377 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
2378 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_b));
2379 }
2380 }
2381
2382 /* path info */
2383 _ssSetModelName(childS, "Gain_sf");
2384 _ssSetPath(childS,
2385 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/apthrustLcontrol/VcControl/gain1/Generated S-Function");
2386 if (ssGetRTModel(rts) == (NULL)) {
2387 _ssSetParentSS(childS, rts);
2388 _ssSetRootSS(childS, ssGetRootSS(rts));
2389 } else {
2390 ssSetRTModel(childS,ssGetRTModel(rts));
2391 _ssSetParentSS(childS, (NULL));
2392 _ssSetRootSS(childS, childS);
2393 }
2394
2395 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
2396
2397 /* registration */
2398 Gain_sf(childS);
2399 sfcnInitializeSizes(childS);
2400 sfcnInitializeSampleTimes(childS);
2401
2402 /* adjust sample time */
2403 ssSetSampleTime(childS, 0, 0.0);
2404 ssSetOffsetTime(childS, 0, 0.0);
2405 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
2406
2407 /* set compiled values of dynamic vector attributes */
2408 ssSetNumNonsampledZCs(childS, 0);
2409
2410 /* Update connectivity flags for each port */
2411 _ssSetInputPortConnected(childS, 0, 1);
2412 _ssSetInputPortConnected(childS, 1, 1);
2413 _ssSetOutputPortConnected(childS, 0, 1);
2414 _ssSetOutputPortBeingMerged(childS, 0, 0);
2415
2416 /* Update the BufferDstPort flags for each input port */
2417 _ssSetInputPortBufferDstPort(childS, 0, -1);
2418 _ssSetInputPortBufferDstPort(childS, 1, -1);
2419
2420 /* Instance data for generated S-Function: Gain */
2421 {
2422 SimStruct *rts = childS;
2423
2424#include "Gain_sfcn_rtw/Gain_sid.h"
2425
2426 }
2427 }
2428
2429 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S177>/Generated S-Function (IntegratorLimited_sf) */
2430 {
2431 SimStruct *childS = ssGetSFunction(rts, 13);
2432
2433 /* timing info */
2434 static time_T sfcnPeriod[1];
2435 static time_T sfcnOffset[1];
2436 static int_T sfcnTsMap[1];
2437 (void) memset((void*)sfcnPeriod, 0,
2438 sizeof(time_T)*1);
2439 (void) memset((void*)sfcnOffset, 0,
2440 sizeof(time_T)*1);
2441 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
2442 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
2443 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
2444
2445 /* Set up the mdlInfo pointer */
2446# ifdef USE_RTMODEL
2447
2448 {
2449 static struct _ssBlkInfo2 _blkInfo2;
2450 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
2451 ssSetBlkInfo2Ptr(childS, blkInfo2);
2452 }
2453
2454 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
2455
2456# else
2457
2458 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
2459
2460# endif /* USE_RTMODEL */
2461
2462 /* Allocate memory of model methods 2 */
2463 {
2464 static struct _ssSFcnModelMethods2 methods2;
2465 ssSetModelMethods2(childS, &methods2);
2466 }
2467
2468 /* Allocate memory of model methods 3 */
2469 {
2470 static struct _ssSFcnModelMethods3 methods3;
2471 ssSetModelMethods3(childS, &methods3);
2472 }
2473
2474 /* Allocate memory for states auxilliary information */
2475 {
2476 static struct _ssStatesInfo2 statesInfo2;
2477 static ssPeriodicStatesInfo periodicStatesInfo;
2478 ssSetStatesInfo2(childS, &statesInfo2);
2479 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
2480 }
2481
2482 /* inputs */
2483 {
2484 static struct _ssPortInputs inputPortInfo[7];
2485 _ssSetNumInputPorts(childS, 7);
2486 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
2487
2488 /* port 0 */
2489 {
2490 static real32_T const *sfcnUPtrs[1];
2491 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
2492 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReuseS;
2493 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
2494 _ssSetInputPortNumDimensions(childS, 0, 1);
2495 ssSetInputPortWidth(childS, 0, 1);
2496 }
2497
2498 /* port 1 */
2499 {
2500 static int8_T const *sfcnUPtrs[1];
2501 sfcnUPtrs[0] = (int8_T const *) &((B_AFCS_MODEL1_T *)
2502 ssGetLocalBlockIO(rts))->DataTypeConversion2_lt;
2503 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
2504 _ssSetInputPortNumDimensions(childS, 1, 1);
2505 ssSetInputPortWidth(childS, 1, 1);
2506 }
2507
2508 /* port 2 */
2509 {
2510 static real32_T const *sfcnUPtrs[1];
2511 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
2512 ssGetLocalBlockIO(rts))->Add2_d;
2513 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
2514 _ssSetInputPortNumDimensions(childS, 2, 1);
2515 ssSetInputPortWidth(childS, 2, 1);
2516 }
2517
2518 /* port 3 */
2519 {
2520 static real32_T const *sfcnUPtrs[1];
2521 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
2522 ssGetLocalBlockIO(rts))->Add2_d;
2523 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
2524 _ssSetInputPortNumDimensions(childS, 3, 1);
2525 ssSetInputPortWidth(childS, 3, 1);
2526 }
2527
2528 /* port 4 */
2529 {
2530 static real32_T const *sfcnUPtrs[1];
2531 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
2532 ssGetLocalBlockIO(rts))->Add_l;
2533 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
2534 _ssSetInputPortNumDimensions(childS, 4, 1);
2535 ssSetInputPortWidth(childS, 4, 1);
2536 }
2537
2538 /* port 5 */
2539 {
2540 static real32_T const *sfcnUPtrs[1];
2541 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
2542 ssGetLocalBlockIO(rts))->Add1_g;
2543 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
2544 _ssSetInputPortNumDimensions(childS, 5, 1);
2545 ssSetInputPortWidth(childS, 5, 1);
2546 }
2547
2548 /* port 6 */
2549 {
2550 static real32_T const *sfcnUPtrs[1];
2551 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
2552 ssGetLocalBlockIO(rts))->GeneratedSFunction_b;
2553 _ssSetInputPortSignalPtrs(childS, 6, (InputPtrsType)&sfcnUPtrs[0]);
2554 _ssSetInputPortNumDimensions(childS, 6, 1);
2555 ssSetInputPortWidth(childS, 6, 1);
2556 }
2557 }
2558
2559 /* outputs */
2560 {
2561 static struct _ssPortOutputs outputPortInfo[1];
2562 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
2563 _ssSetNumOutputPorts(childS, 1);
2564
2565 /* port 0 */
2566 {
2567 _ssSetOutputPortNumDimensions(childS, 0, 1);
2568 ssSetOutputPortWidth(childS, 0, 1);
2569 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
2570 *) ssGetLocalBlockIO(rts))->Product1_g));
2571 }
2572 }
2573
2574 /* path info */
2575 _ssSetModelName(childS, "IntegratorLimited_sf");
2576 _ssSetPath(childS,
2577 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/apthrustLcontrol/VcControl/Integrator Limited/Generated S-Function");
2578 if (ssGetRTModel(rts) == (NULL)) {
2579 _ssSetParentSS(childS, rts);
2580 _ssSetRootSS(childS, ssGetRootSS(rts));
2581 } else {
2582 ssSetRTModel(childS,ssGetRTModel(rts));
2583 _ssSetParentSS(childS, (NULL));
2584 _ssSetRootSS(childS, childS);
2585 }
2586
2587 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
2588
2589 /* work vectors */
2590 {
2591 static struct _ssDWorkRecord dWorkRecord[4];
2592 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
2593 ssSetSFcnDWork(childS, dWorkRecord);
2594 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
2595 _ssSetNumDWork(childS, 4);
2596
2597 /* DWORK0 */
2598 ssSetDWorkWidth(childS, 0, 1);
2599 ssSetDWorkDataType(childS, 0,SS_SINGLE);
2600 ssSetDWorkComplexSignal(childS, 0, 0);
2601 ssSetDWorkUsedAsDState(childS, 0, 1);
2602 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 157))[0]);
2603
2604 /* DWORK1 */
2605 ssSetDWorkWidth(childS, 1, 1);
2606 ssSetDWorkDataType(childS, 1,SS_SINGLE);
2607 ssSetDWorkComplexSignal(childS, 1, 0);
2608 ssSetDWorkUsedAsDState(childS, 1, 1);
2609 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 158))[0]);
2610
2611 /* DWORK2 */
2612 ssSetDWorkWidth(childS, 2, 1);
2613 ssSetDWorkDataType(childS, 2,SS_INT8);
2614 ssSetDWorkComplexSignal(childS, 2, 0);
2615 ssSetDWorkUsedAsDState(childS, 2, 1);
2616 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 384))[0]);
2617
2618 /* DWORK3 */
2619 ssSetDWorkWidth(childS, 3, 1);
2620 ssSetDWorkDataType(childS, 3,SS_INT8);
2621 ssSetDWorkComplexSignal(childS, 3, 0);
2622 ssSetDWorkUsedAsDState(childS, 3, 1);
2623 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 385))[0]);
2624 }
2625
2626 /* registration */
2627 IntegratorLimited_sf(childS);
2628 sfcnInitializeSizes(childS);
2629 sfcnInitializeSampleTimes(childS);
2630
2631 /* adjust sample time */
2632 ssSetSampleTime(childS, 0, 0.0);
2633 ssSetOffsetTime(childS, 0, 0.0);
2634 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
2635
2636 /* set compiled values of dynamic vector attributes */
2637 ssSetNumNonsampledZCs(childS, 0);
2638
2639 /* Update connectivity flags for each port */
2640 _ssSetInputPortConnected(childS, 0, 1);
2641 _ssSetInputPortConnected(childS, 1, 1);
2642 _ssSetInputPortConnected(childS, 2, 1);
2643 _ssSetInputPortConnected(childS, 3, 1);
2644 _ssSetInputPortConnected(childS, 4, 1);
2645 _ssSetInputPortConnected(childS, 5, 1);
2646 _ssSetInputPortConnected(childS, 6, 1);
2647 _ssSetOutputPortConnected(childS, 0, 1);
2648 _ssSetOutputPortBeingMerged(childS, 0, 0);
2649
2650 /* Update the BufferDstPort flags for each input port */
2651 _ssSetInputPortBufferDstPort(childS, 0, -1);
2652 _ssSetInputPortBufferDstPort(childS, 1, -1);
2653 _ssSetInputPortBufferDstPort(childS, 2, -1);
2654 _ssSetInputPortBufferDstPort(childS, 3, -1);
2655 _ssSetInputPortBufferDstPort(childS, 4, -1);
2656 _ssSetInputPortBufferDstPort(childS, 5, -1);
2657 _ssSetInputPortBufferDstPort(childS, 6, -1);
2658
2659 /* Instance data for generated S-Function: IntegratorLimited */
2660 {
2661 SimStruct *rts = childS;
2662
2663#include "IntegratorLimited_sfcn_rtw/IntegratorLimited_sid.h"
2664
2665 }
2666 }
2667
2668 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S176>/Generated S-Function (LagFilter_sf) */
2669 {
2670 SimStruct *childS = ssGetSFunction(rts, 14);
2671
2672 /* timing info */
2673 static time_T sfcnPeriod[1];
2674 static time_T sfcnOffset[1];
2675 static int_T sfcnTsMap[1];
2676 (void) memset((void*)sfcnPeriod, 0,
2677 sizeof(time_T)*1);
2678 (void) memset((void*)sfcnOffset, 0,
2679 sizeof(time_T)*1);
2680 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
2681 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
2682 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
2683
2684 /* Set up the mdlInfo pointer */
2685# ifdef USE_RTMODEL
2686
2687 {
2688 static struct _ssBlkInfo2 _blkInfo2;
2689 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
2690 ssSetBlkInfo2Ptr(childS, blkInfo2);
2691 }
2692
2693 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
2694
2695# else
2696
2697 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
2698
2699# endif /* USE_RTMODEL */
2700
2701 /* Allocate memory of model methods 2 */
2702 {
2703 static struct _ssSFcnModelMethods2 methods2;
2704 ssSetModelMethods2(childS, &methods2);
2705 }
2706
2707 /* Allocate memory of model methods 3 */
2708 {
2709 static struct _ssSFcnModelMethods3 methods3;
2710 ssSetModelMethods3(childS, &methods3);
2711 }
2712
2713 /* Allocate memory for states auxilliary information */
2714 {
2715 static struct _ssStatesInfo2 statesInfo2;
2716 static ssPeriodicStatesInfo periodicStatesInfo;
2717 ssSetStatesInfo2(childS, &statesInfo2);
2718 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
2719 }
2720
2721 /* inputs */
2722 {
2723 static struct _ssPortInputs inputPortInfo[6];
2724 _ssSetNumInputPorts(childS, 6);
2725 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
2726
2727 /* port 0 */
2728 {
2729 static real32_T const *sfcnUPtrs[1];
2730 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
2731 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReuseS;
2732 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
2733 _ssSetInputPortNumDimensions(childS, 0, 1);
2734 ssSetInputPortWidth(childS, 0, 1);
2735 }
2736
2737 /* port 1 */
2738 {
2739 static int8_T const *sfcnUPtrs[1];
2740 sfcnUPtrs[0] = (int8_T const *) &((B_AFCS_MODEL1_T *)
2741 ssGetLocalBlockIO(rts))->DataTypeConversion2_lt;
2742 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
2743 _ssSetInputPortNumDimensions(childS, 1, 1);
2744 ssSetInputPortWidth(childS, 1, 1);
2745 }
2746
2747 /* port 2 */
2748 {
2749 static real32_T const *sfcnUPtrs[1];
2750 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled107;
2751 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
2752 _ssSetInputPortNumDimensions(childS, 2, 1);
2753 ssSetInputPortWidth(childS, 2, 1);
2754 }
2755
2756 /* port 3 */
2757 {
2758 static real32_T const *sfcnUPtrs[1];
2759 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
2760 ssGetLocalBlockIO(rts))->Switch_k;
2761 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
2762 _ssSetInputPortNumDimensions(childS, 3, 1);
2763 ssSetInputPortWidth(childS, 3, 1);
2764 }
2765
2766 /* port 4 */
2767 {
2768 static real32_T const *sfcnUPtrs[1];
2769 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
2770 ssGetLocalBlockIO(rts))->Switch_k;
2771 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
2772 _ssSetInputPortNumDimensions(childS, 4, 1);
2773 ssSetInputPortWidth(childS, 4, 1);
2774 }
2775
2776 /* port 5 */
2777 {
2778 static real32_T const *sfcnUPtrs[1];
2779 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
2780 ssGetLocalBlockIO(rts))->Sum1_a;
2781 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
2782 _ssSetInputPortNumDimensions(childS, 5, 1);
2783 ssSetInputPortWidth(childS, 5, 1);
2784 }
2785 }
2786
2787 /* outputs */
2788 {
2789 static struct _ssPortOutputs outputPortInfo[1];
2790 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
2791 _ssSetNumOutputPorts(childS, 1);
2792
2793 /* port 0 */
2794 {
2795 _ssSetOutputPortNumDimensions(childS, 0, 1);
2796 ssSetOutputPortWidth(childS, 0, 1);
2797 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
2798 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_m));
2799 }
2800 }
2801
2802 /* path info */
2803 _ssSetModelName(childS, "LagFilter_sf");
2804 _ssSetPath(childS,
2805 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/apthrustLcontrol/VcControl/ lag filter/Generated S-Function");
2806 if (ssGetRTModel(rts) == (NULL)) {
2807 _ssSetParentSS(childS, rts);
2808 _ssSetRootSS(childS, ssGetRootSS(rts));
2809 } else {
2810 ssSetRTModel(childS,ssGetRTModel(rts));
2811 _ssSetParentSS(childS, (NULL));
2812 _ssSetRootSS(childS, childS);
2813 }
2814
2815 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
2816
2817 /* work vectors */
2818 {
2819 static struct _ssDWorkRecord dWorkRecord[4];
2820 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
2821 ssSetSFcnDWork(childS, dWorkRecord);
2822 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
2823 _ssSetNumDWork(childS, 4);
2824
2825 /* DWORK0 */
2826 ssSetDWorkWidth(childS, 0, 1);
2827 ssSetDWorkDataType(childS, 0,SS_SINGLE);
2828 ssSetDWorkComplexSignal(childS, 0, 0);
2829 ssSetDWorkUsedAsDState(childS, 0, 1);
2830 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 159))[0]);
2831
2832 /* DWORK1 */
2833 ssSetDWorkWidth(childS, 1, 1);
2834 ssSetDWorkDataType(childS, 1,SS_SINGLE);
2835 ssSetDWorkComplexSignal(childS, 1, 0);
2836 ssSetDWorkUsedAsDState(childS, 1, 1);
2837 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 160))[0]);
2838
2839 /* DWORK2 */
2840 ssSetDWorkWidth(childS, 2, 1);
2841 ssSetDWorkDataType(childS, 2,SS_INT8);
2842 ssSetDWorkComplexSignal(childS, 2, 0);
2843 ssSetDWorkUsedAsDState(childS, 2, 1);
2844 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 386))[0]);
2845
2846 /* DWORK3 */
2847 ssSetDWorkWidth(childS, 3, 1);
2848 ssSetDWorkDataType(childS, 3,SS_INT8);
2849 ssSetDWorkComplexSignal(childS, 3, 0);
2850 ssSetDWorkUsedAsDState(childS, 3, 1);
2851 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 387))[0]);
2852 }
2853
2854 /* registration */
2855 LagFilter_sf(childS);
2856 sfcnInitializeSizes(childS);
2857 sfcnInitializeSampleTimes(childS);
2858
2859 /* adjust sample time */
2860 ssSetSampleTime(childS, 0, 0.0);
2861 ssSetOffsetTime(childS, 0, 0.0);
2862 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
2863
2864 /* set compiled values of dynamic vector attributes */
2865 ssSetNumNonsampledZCs(childS, 0);
2866
2867 /* Update connectivity flags for each port */
2868 _ssSetInputPortConnected(childS, 0, 1);
2869 _ssSetInputPortConnected(childS, 1, 1);
2870 _ssSetInputPortConnected(childS, 2, 1);
2871 _ssSetInputPortConnected(childS, 3, 1);
2872 _ssSetInputPortConnected(childS, 4, 1);
2873 _ssSetInputPortConnected(childS, 5, 1);
2874 _ssSetOutputPortConnected(childS, 0, 1);
2875 _ssSetOutputPortBeingMerged(childS, 0, 0);
2876
2877 /* Update the BufferDstPort flags for each input port */
2878 _ssSetInputPortBufferDstPort(childS, 0, -1);
2879 _ssSetInputPortBufferDstPort(childS, 1, -1);
2880 _ssSetInputPortBufferDstPort(childS, 2, -1);
2881 _ssSetInputPortBufferDstPort(childS, 3, -1);
2882 _ssSetInputPortBufferDstPort(childS, 4, -1);
2883 _ssSetInputPortBufferDstPort(childS, 5, -1);
2884
2885 /* Instance data for generated S-Function: LagFilter */
2886 {
2887 SimStruct *rts = childS;
2888
2889#include "LagFilter_sfcn_rtw/LagFilter_sid.h"
2890
2891 }
2892 }
2893
2894 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S92>/Generated S-Function1 (SaturationLimiter_sf) */
2895 {
2896 SimStruct *childS = ssGetSFunction(rts, 15);
2897
2898 /* timing info */
2899 static time_T sfcnPeriod[1];
2900 static time_T sfcnOffset[1];
2901 static int_T sfcnTsMap[1];
2902 (void) memset((void*)sfcnPeriod, 0,
2903 sizeof(time_T)*1);
2904 (void) memset((void*)sfcnOffset, 0,
2905 sizeof(time_T)*1);
2906 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
2907 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
2908 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
2909
2910 /* Set up the mdlInfo pointer */
2911# ifdef USE_RTMODEL
2912
2913 {
2914 static struct _ssBlkInfo2 _blkInfo2;
2915 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
2916 ssSetBlkInfo2Ptr(childS, blkInfo2);
2917 }
2918
2919 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
2920
2921# else
2922
2923 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
2924
2925# endif /* USE_RTMODEL */
2926
2927 /* Allocate memory of model methods 2 */
2928 {
2929 static struct _ssSFcnModelMethods2 methods2;
2930 ssSetModelMethods2(childS, &methods2);
2931 }
2932
2933 /* Allocate memory of model methods 3 */
2934 {
2935 static struct _ssSFcnModelMethods3 methods3;
2936 ssSetModelMethods3(childS, &methods3);
2937 }
2938
2939 /* Allocate memory for states auxilliary information */
2940 {
2941 static struct _ssStatesInfo2 statesInfo2;
2942 static ssPeriodicStatesInfo periodicStatesInfo;
2943 ssSetStatesInfo2(childS, &statesInfo2);
2944 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
2945 }
2946
2947 /* inputs */
2948 {
2949 static struct _ssPortInputs inputPortInfo[3];
2950 _ssSetNumInputPorts(childS, 3);
2951 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
2952
2953 /* port 0 */
2954 {
2955 static real32_T const *sfcnUPtrs[1];
2956 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
2957 ssGetLocalBlockIO(rts))->Sum6;
2958 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
2959 _ssSetInputPortNumDimensions(childS, 0, 1);
2960 ssSetInputPortWidth(childS, 0, 1);
2961 }
2962
2963 /* port 1 */
2964 {
2965 static real32_T const *sfcnUPtrs[1];
2966 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled114;
2967 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
2968 _ssSetInputPortNumDimensions(childS, 1, 1);
2969 ssSetInputPortWidth(childS, 1, 1);
2970 }
2971
2972 /* port 2 */
2973 {
2974 static real32_T const *sfcnUPtrs[1];
2975 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled115;
2976 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
2977 _ssSetInputPortNumDimensions(childS, 2, 1);
2978 ssSetInputPortWidth(childS, 2, 1);
2979 }
2980 }
2981
2982 /* outputs */
2983 {
2984 static struct _ssPortOutputs outputPortInfo[1];
2985 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
2986 _ssSetNumOutputPorts(childS, 1);
2987
2988 /* port 0 */
2989 {
2990 _ssSetOutputPortNumDimensions(childS, 0, 1);
2991 ssSetOutputPortWidth(childS, 0, 1);
2992 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
2993 *) ssGetLocalBlockIO(rts))->GeneratedSFunction1));
2994 }
2995 }
2996
2997 /* path info */
2998 _ssSetModelName(childS, "SaturationLimiter_sf");
2999 _ssSetPath(childS,
3000 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/appcLcontrol/AltLControl/Saturation Limiter2/Generated S-Function1");
3001 if (ssGetRTModel(rts) == (NULL)) {
3002 _ssSetParentSS(childS, rts);
3003 _ssSetRootSS(childS, ssGetRootSS(rts));
3004 } else {
3005 ssSetRTModel(childS,ssGetRTModel(rts));
3006 _ssSetParentSS(childS, (NULL));
3007 _ssSetRootSS(childS, childS);
3008 }
3009
3010 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
3011
3012 /* registration */
3013 SaturationLimiter_sf(childS);
3014 sfcnInitializeSizes(childS);
3015 sfcnInitializeSampleTimes(childS);
3016
3017 /* adjust sample time */
3018 ssSetSampleTime(childS, 0, 0.0);
3019 ssSetOffsetTime(childS, 0, 0.0);
3020 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
3021
3022 /* set compiled values of dynamic vector attributes */
3023 ssSetNumNonsampledZCs(childS, 0);
3024
3025 /* Update connectivity flags for each port */
3026 _ssSetInputPortConnected(childS, 0, 1);
3027 _ssSetInputPortConnected(childS, 1, 1);
3028 _ssSetInputPortConnected(childS, 2, 1);
3029 _ssSetOutputPortConnected(childS, 0, 1);
3030 _ssSetOutputPortBeingMerged(childS, 0, 0);
3031
3032 /* Update the BufferDstPort flags for each input port */
3033 _ssSetInputPortBufferDstPort(childS, 0, -1);
3034 _ssSetInputPortBufferDstPort(childS, 1, -1);
3035 _ssSetInputPortBufferDstPort(childS, 2, -1);
3036
3037 /* Instance data for generated S-Function: SaturationLimiter */
3038 {
3039 SimStruct *rts = childS;
3040
3041#include "SaturationLimiter_sfcn_rtw/SaturationLimiter_sid.h"
3042
3043 }
3044 }
3045
3046 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S96>/Generated S-Function (Gain_sf) */
3047 {
3048 SimStruct *childS = ssGetSFunction(rts, 16);
3049
3050 /* timing info */
3051 static time_T sfcnPeriod[1];
3052 static time_T sfcnOffset[1];
3053 static int_T sfcnTsMap[1];
3054 (void) memset((void*)sfcnPeriod, 0,
3055 sizeof(time_T)*1);
3056 (void) memset((void*)sfcnOffset, 0,
3057 sizeof(time_T)*1);
3058 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
3059 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
3060 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
3061
3062 /* Set up the mdlInfo pointer */
3063# ifdef USE_RTMODEL
3064
3065 {
3066 static struct _ssBlkInfo2 _blkInfo2;
3067 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
3068 ssSetBlkInfo2Ptr(childS, blkInfo2);
3069 }
3070
3071 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
3072
3073# else
3074
3075 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
3076
3077# endif /* USE_RTMODEL */
3078
3079 /* Allocate memory of model methods 2 */
3080 {
3081 static struct _ssSFcnModelMethods2 methods2;
3082 ssSetModelMethods2(childS, &methods2);
3083 }
3084
3085 /* Allocate memory of model methods 3 */
3086 {
3087 static struct _ssSFcnModelMethods3 methods3;
3088 ssSetModelMethods3(childS, &methods3);
3089 }
3090
3091 /* Allocate memory for states auxilliary information */
3092 {
3093 static struct _ssStatesInfo2 statesInfo2;
3094 static ssPeriodicStatesInfo periodicStatesInfo;
3095 ssSetStatesInfo2(childS, &statesInfo2);
3096 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
3097 }
3098
3099 /* inputs */
3100 {
3101 static struct _ssPortInputs inputPortInfo[2];
3102 _ssSetNumInputPorts(childS, 2);
3103 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
3104
3105 /* port 0 */
3106 {
3107 static real32_T const *sfcnUPtrs[1];
3108 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
3109 ssGetLocalBlockIO(rts))->GeneratedSFunction1;
3110 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
3111 _ssSetInputPortNumDimensions(childS, 0, 1);
3112 ssSetInputPortWidth(childS, 0, 1);
3113 }
3114
3115 /* port 1 */
3116 {
3117 static real32_T const *sfcnUPtrs[1];
3118 sfcnUPtrs[0] = (real32_T const *)
3119 &AFCS_MODEL1_ConstP.Constant22_Value;
3120 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
3121 _ssSetInputPortNumDimensions(childS, 1, 1);
3122 ssSetInputPortWidth(childS, 1, 1);
3123 }
3124 }
3125
3126 /* outputs */
3127 {
3128 static struct _ssPortOutputs outputPortInfo[1];
3129 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
3130 _ssSetNumOutputPorts(childS, 1);
3131
3132 /* port 0 */
3133 {
3134 _ssSetOutputPortNumDimensions(childS, 0, 1);
3135 ssSetOutputPortWidth(childS, 0, 1);
3136 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
3137 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_o));
3138 }
3139 }
3140
3141 /* path info */
3142 _ssSetModelName(childS, "Gain_sf");
3143 _ssSetPath(childS,
3144 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/appcLcontrol/AltLControl/gain2/Generated S-Function");
3145 if (ssGetRTModel(rts) == (NULL)) {
3146 _ssSetParentSS(childS, rts);
3147 _ssSetRootSS(childS, ssGetRootSS(rts));
3148 } else {
3149 ssSetRTModel(childS,ssGetRTModel(rts));
3150 _ssSetParentSS(childS, (NULL));
3151 _ssSetRootSS(childS, childS);
3152 }
3153
3154 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
3155
3156 /* registration */
3157 Gain_sf(childS);
3158 sfcnInitializeSizes(childS);
3159 sfcnInitializeSampleTimes(childS);
3160
3161 /* adjust sample time */
3162 ssSetSampleTime(childS, 0, 0.0);
3163 ssSetOffsetTime(childS, 0, 0.0);
3164 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
3165
3166 /* set compiled values of dynamic vector attributes */
3167 ssSetNumNonsampledZCs(childS, 0);
3168
3169 /* Update connectivity flags for each port */
3170 _ssSetInputPortConnected(childS, 0, 1);
3171 _ssSetInputPortConnected(childS, 1, 1);
3172 _ssSetOutputPortConnected(childS, 0, 1);
3173 _ssSetOutputPortBeingMerged(childS, 0, 0);
3174
3175 /* Update the BufferDstPort flags for each input port */
3176 _ssSetInputPortBufferDstPort(childS, 0, -1);
3177 _ssSetInputPortBufferDstPort(childS, 1, -1);
3178
3179 /* Instance data for generated S-Function: Gain */
3180 {
3181 SimStruct *rts = childS;
3182
3183#include "Gain_sfcn_rtw/Gain_sid.h"
3184
3185 }
3186 }
3187
3188 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S93>/Generated S-Function1 (SaturationLimiter_sf) */
3189 {
3190 SimStruct *childS = ssGetSFunction(rts, 17);
3191
3192 /* timing info */
3193 static time_T sfcnPeriod[1];
3194 static time_T sfcnOffset[1];
3195 static int_T sfcnTsMap[1];
3196 (void) memset((void*)sfcnPeriod, 0,
3197 sizeof(time_T)*1);
3198 (void) memset((void*)sfcnOffset, 0,
3199 sizeof(time_T)*1);
3200 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
3201 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
3202 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
3203
3204 /* Set up the mdlInfo pointer */
3205# ifdef USE_RTMODEL
3206
3207 {
3208 static struct _ssBlkInfo2 _blkInfo2;
3209 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
3210 ssSetBlkInfo2Ptr(childS, blkInfo2);
3211 }
3212
3213 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
3214
3215# else
3216
3217 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
3218
3219# endif /* USE_RTMODEL */
3220
3221 /* Allocate memory of model methods 2 */
3222 {
3223 static struct _ssSFcnModelMethods2 methods2;
3224 ssSetModelMethods2(childS, &methods2);
3225 }
3226
3227 /* Allocate memory of model methods 3 */
3228 {
3229 static struct _ssSFcnModelMethods3 methods3;
3230 ssSetModelMethods3(childS, &methods3);
3231 }
3232
3233 /* Allocate memory for states auxilliary information */
3234 {
3235 static struct _ssStatesInfo2 statesInfo2;
3236 static ssPeriodicStatesInfo periodicStatesInfo;
3237 ssSetStatesInfo2(childS, &statesInfo2);
3238 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
3239 }
3240
3241 /* inputs */
3242 {
3243 static struct _ssPortInputs inputPortInfo[3];
3244 _ssSetNumInputPorts(childS, 3);
3245 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
3246
3247 /* port 0 */
3248 {
3249 static real32_T const *sfcnUPtrs[1];
3250 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
3251 ssGetLocalBlockIO(rts))->Divide2;
3252 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
3253 _ssSetInputPortNumDimensions(childS, 0, 1);
3254 ssSetInputPortWidth(childS, 0, 1);
3255 }
3256
3257 /* port 1 */
3258 {
3259 static real32_T const *sfcnUPtrs[1];
3260 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled111;
3261 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
3262 _ssSetInputPortNumDimensions(childS, 1, 1);
3263 ssSetInputPortWidth(childS, 1, 1);
3264 }
3265
3266 /* port 2 */
3267 {
3268 static real32_T const *sfcnUPtrs[1];
3269 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled112;
3270 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
3271 _ssSetInputPortNumDimensions(childS, 2, 1);
3272 ssSetInputPortWidth(childS, 2, 1);
3273 }
3274 }
3275
3276 /* outputs */
3277 {
3278 static struct _ssPortOutputs outputPortInfo[1];
3279 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
3280 _ssSetNumOutputPorts(childS, 1);
3281
3282 /* port 0 */
3283 {
3284 _ssSetOutputPortNumDimensions(childS, 0, 1);
3285 ssSetOutputPortWidth(childS, 0, 1);
3286 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
3287 *) ssGetLocalBlockIO(rts))->Switch6_d));
3288 }
3289 }
3290
3291 /* path info */
3292 _ssSetModelName(childS, "SaturationLimiter_sf");
3293 _ssSetPath(childS,
3294 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/appcLcontrol/AltLControl/Saturation Limiter3/Generated S-Function1");
3295 if (ssGetRTModel(rts) == (NULL)) {
3296 _ssSetParentSS(childS, rts);
3297 _ssSetRootSS(childS, ssGetRootSS(rts));
3298 } else {
3299 ssSetRTModel(childS,ssGetRTModel(rts));
3300 _ssSetParentSS(childS, (NULL));
3301 _ssSetRootSS(childS, childS);
3302 }
3303
3304 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
3305
3306 /* registration */
3307 SaturationLimiter_sf(childS);
3308 sfcnInitializeSizes(childS);
3309 sfcnInitializeSampleTimes(childS);
3310
3311 /* adjust sample time */
3312 ssSetSampleTime(childS, 0, 0.0);
3313 ssSetOffsetTime(childS, 0, 0.0);
3314 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
3315
3316 /* set compiled values of dynamic vector attributes */
3317 ssSetNumNonsampledZCs(childS, 0);
3318
3319 /* Update connectivity flags for each port */
3320 _ssSetInputPortConnected(childS, 0, 1);
3321 _ssSetInputPortConnected(childS, 1, 1);
3322 _ssSetInputPortConnected(childS, 2, 1);
3323 _ssSetOutputPortConnected(childS, 0, 1);
3324 _ssSetOutputPortBeingMerged(childS, 0, 0);
3325
3326 /* Update the BufferDstPort flags for each input port */
3327 _ssSetInputPortBufferDstPort(childS, 0, -1);
3328 _ssSetInputPortBufferDstPort(childS, 1, -1);
3329 _ssSetInputPortBufferDstPort(childS, 2, -1);
3330
3331 /* Instance data for generated S-Function: SaturationLimiter */
3332 {
3333 SimStruct *rts = childS;
3334
3335#include "SaturationLimiter_sfcn_rtw/SaturationLimiter_sid.h"
3336
3337 }
3338 }
3339
3340 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S97>/Generated S-Function (Gain_sf) */
3341 {
3342 SimStruct *childS = ssGetSFunction(rts, 18);
3343
3344 /* timing info */
3345 static time_T sfcnPeriod[1];
3346 static time_T sfcnOffset[1];
3347 static int_T sfcnTsMap[1];
3348 (void) memset((void*)sfcnPeriod, 0,
3349 sizeof(time_T)*1);
3350 (void) memset((void*)sfcnOffset, 0,
3351 sizeof(time_T)*1);
3352 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
3353 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
3354 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
3355
3356 /* Set up the mdlInfo pointer */
3357# ifdef USE_RTMODEL
3358
3359 {
3360 static struct _ssBlkInfo2 _blkInfo2;
3361 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
3362 ssSetBlkInfo2Ptr(childS, blkInfo2);
3363 }
3364
3365 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
3366
3367# else
3368
3369 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
3370
3371# endif /* USE_RTMODEL */
3372
3373 /* Allocate memory of model methods 2 */
3374 {
3375 static struct _ssSFcnModelMethods2 methods2;
3376 ssSetModelMethods2(childS, &methods2);
3377 }
3378
3379 /* Allocate memory of model methods 3 */
3380 {
3381 static struct _ssSFcnModelMethods3 methods3;
3382 ssSetModelMethods3(childS, &methods3);
3383 }
3384
3385 /* Allocate memory for states auxilliary information */
3386 {
3387 static struct _ssStatesInfo2 statesInfo2;
3388 static ssPeriodicStatesInfo periodicStatesInfo;
3389 ssSetStatesInfo2(childS, &statesInfo2);
3390 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
3391 }
3392
3393 /* inputs */
3394 {
3395 static struct _ssPortInputs inputPortInfo[2];
3396 _ssSetNumInputPorts(childS, 2);
3397 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
3398
3399 /* port 0 */
3400 {
3401 static real32_T const *sfcnUPtrs[1];
3402 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
3403 ssGetLocalBlockIO(rts))->GeneratedSFunction_o;
3404 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
3405 _ssSetInputPortNumDimensions(childS, 0, 1);
3406 ssSetInputPortWidth(childS, 0, 1);
3407 }
3408
3409 /* port 1 */
3410 {
3411 static real32_T const *sfcnUPtrs[1];
3412 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled116;
3413 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
3414 _ssSetInputPortNumDimensions(childS, 1, 1);
3415 ssSetInputPortWidth(childS, 1, 1);
3416 }
3417 }
3418
3419 /* outputs */
3420 {
3421 static struct _ssPortOutputs outputPortInfo[1];
3422 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
3423 _ssSetNumOutputPorts(childS, 1);
3424
3425 /* port 0 */
3426 {
3427 _ssSetOutputPortNumDimensions(childS, 0, 1);
3428 ssSetOutputPortWidth(childS, 0, 1);
3429 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
3430 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_jq));
3431 }
3432 }
3433
3434 /* path info */
3435 _ssSetModelName(childS, "Gain_sf");
3436 _ssSetPath(childS,
3437 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/appcLcontrol/AltLControl/gain4/Generated S-Function");
3438 if (ssGetRTModel(rts) == (NULL)) {
3439 _ssSetParentSS(childS, rts);
3440 _ssSetRootSS(childS, ssGetRootSS(rts));
3441 } else {
3442 ssSetRTModel(childS,ssGetRTModel(rts));
3443 _ssSetParentSS(childS, (NULL));
3444 _ssSetRootSS(childS, childS);
3445 }
3446
3447 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
3448
3449 /* registration */
3450 Gain_sf(childS);
3451 sfcnInitializeSizes(childS);
3452 sfcnInitializeSampleTimes(childS);
3453
3454 /* adjust sample time */
3455 ssSetSampleTime(childS, 0, 0.0);
3456 ssSetOffsetTime(childS, 0, 0.0);
3457 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
3458
3459 /* set compiled values of dynamic vector attributes */
3460 ssSetNumNonsampledZCs(childS, 0);
3461
3462 /* Update connectivity flags for each port */
3463 _ssSetInputPortConnected(childS, 0, 1);
3464 _ssSetInputPortConnected(childS, 1, 1);
3465 _ssSetOutputPortConnected(childS, 0, 1);
3466 _ssSetOutputPortBeingMerged(childS, 0, 0);
3467
3468 /* Update the BufferDstPort flags for each input port */
3469 _ssSetInputPortBufferDstPort(childS, 0, -1);
3470 _ssSetInputPortBufferDstPort(childS, 1, -1);
3471
3472 /* Instance data for generated S-Function: Gain */
3473 {
3474 SimStruct *rts = childS;
3475
3476#include "Gain_sfcn_rtw/Gain_sid.h"
3477
3478 }
3479 }
3480
3481 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S89>/Generated S-Function3 (IntegratorLimited_sf) */
3482 {
3483 SimStruct *childS = ssGetSFunction(rts, 19);
3484
3485 /* timing info */
3486 static time_T sfcnPeriod[1];
3487 static time_T sfcnOffset[1];
3488 static int_T sfcnTsMap[1];
3489 (void) memset((void*)sfcnPeriod, 0,
3490 sizeof(time_T)*1);
3491 (void) memset((void*)sfcnOffset, 0,
3492 sizeof(time_T)*1);
3493 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
3494 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
3495 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
3496
3497 /* Set up the mdlInfo pointer */
3498# ifdef USE_RTMODEL
3499
3500 {
3501 static struct _ssBlkInfo2 _blkInfo2;
3502 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
3503 ssSetBlkInfo2Ptr(childS, blkInfo2);
3504 }
3505
3506 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
3507
3508# else
3509
3510 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
3511
3512# endif /* USE_RTMODEL */
3513
3514 /* Allocate memory of model methods 2 */
3515 {
3516 static struct _ssSFcnModelMethods2 methods2;
3517 ssSetModelMethods2(childS, &methods2);
3518 }
3519
3520 /* Allocate memory of model methods 3 */
3521 {
3522 static struct _ssSFcnModelMethods3 methods3;
3523 ssSetModelMethods3(childS, &methods3);
3524 }
3525
3526 /* Allocate memory for states auxilliary information */
3527 {
3528 static struct _ssStatesInfo2 statesInfo2;
3529 static ssPeriodicStatesInfo periodicStatesInfo;
3530 ssSetStatesInfo2(childS, &statesInfo2);
3531 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
3532 }
3533
3534 /* inputs */
3535 {
3536 static struct _ssPortInputs inputPortInfo[7];
3537 _ssSetNumInputPorts(childS, 7);
3538 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
3539
3540 /* port 0 */
3541 {
3542 static real32_T const *sfcnUPtrs[1];
3543 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
3544 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReuseS;
3545 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
3546 _ssSetInputPortNumDimensions(childS, 0, 1);
3547 ssSetInputPortWidth(childS, 0, 1);
3548 }
3549
3550 /* port 1 */
3551 {
3552 static int8_T const *sfcnUPtrs[1];
3553 sfcnUPtrs[0] = (int8_T const *) &((B_AFCS_MODEL1_T *)
3554 ssGetLocalBlockIO(rts))->DataTypeConversion3_c;
3555 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
3556 _ssSetInputPortNumDimensions(childS, 1, 1);
3557 ssSetInputPortWidth(childS, 1, 1);
3558 }
3559
3560 /* port 2 */
3561 {
3562 static real32_T const *sfcnUPtrs[1];
3563 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
3564 ssGetLocalBlockIO(rts))->Sum8;
3565 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
3566 _ssSetInputPortNumDimensions(childS, 2, 1);
3567 ssSetInputPortWidth(childS, 2, 1);
3568 }
3569
3570 /* port 3 */
3571 {
3572 static real32_T const *sfcnUPtrs[1];
3573 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
3574 ssGetLocalBlockIO(rts))->Sum8;
3575 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
3576 _ssSetInputPortNumDimensions(childS, 3, 1);
3577 ssSetInputPortWidth(childS, 3, 1);
3578 }
3579
3580 /* port 4 */
3581 {
3582 static real32_T const *sfcnUPtrs[1];
3583 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled111;
3584 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
3585 _ssSetInputPortNumDimensions(childS, 4, 1);
3586 ssSetInputPortWidth(childS, 4, 1);
3587 }
3588
3589 /* port 5 */
3590 {
3591 static real32_T const *sfcnUPtrs[1];
3592 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled112;
3593 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
3594 _ssSetInputPortNumDimensions(childS, 5, 1);
3595 ssSetInputPortWidth(childS, 5, 1);
3596 }
3597
3598 /* port 6 */
3599 {
3600 static real32_T const *sfcnUPtrs[1];
3601 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
3602 ssGetLocalBlockIO(rts))->GeneratedSFunction_jq;
3603 _ssSetInputPortSignalPtrs(childS, 6, (InputPtrsType)&sfcnUPtrs[0]);
3604 _ssSetInputPortNumDimensions(childS, 6, 1);
3605 ssSetInputPortWidth(childS, 6, 1);
3606 }
3607 }
3608
3609 /* outputs */
3610 {
3611 static struct _ssPortOutputs outputPortInfo[1];
3612 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
3613 _ssSetNumOutputPorts(childS, 1);
3614
3615 /* port 0 */
3616 {
3617 _ssSetOutputPortNumDimensions(childS, 0, 1);
3618 ssSetOutputPortWidth(childS, 0, 1);
3619 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
3620 *) ssGetLocalBlockIO(rts))->Switch6_d));
3621 }
3622 }
3623
3624 /* path info */
3625 _ssSetModelName(childS, "IntegratorLimited_sf");
3626 _ssSetPath(childS,
3627 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/appcLcontrol/AltLControl/Integrator Limited1/Generated S-Function3");
3628 if (ssGetRTModel(rts) == (NULL)) {
3629 _ssSetParentSS(childS, rts);
3630 _ssSetRootSS(childS, ssGetRootSS(rts));
3631 } else {
3632 ssSetRTModel(childS,ssGetRTModel(rts));
3633 _ssSetParentSS(childS, (NULL));
3634 _ssSetRootSS(childS, childS);
3635 }
3636
3637 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
3638
3639 /* work vectors */
3640 {
3641 static struct _ssDWorkRecord dWorkRecord[4];
3642 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
3643 ssSetSFcnDWork(childS, dWorkRecord);
3644 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
3645 _ssSetNumDWork(childS, 4);
3646
3647 /* DWORK0 */
3648 ssSetDWorkWidth(childS, 0, 1);
3649 ssSetDWorkDataType(childS, 0,SS_SINGLE);
3650 ssSetDWorkComplexSignal(childS, 0, 0);
3651 ssSetDWorkUsedAsDState(childS, 0, 1);
3652 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 162))[0]);
3653
3654 /* DWORK1 */
3655 ssSetDWorkWidth(childS, 1, 1);
3656 ssSetDWorkDataType(childS, 1,SS_SINGLE);
3657 ssSetDWorkComplexSignal(childS, 1, 0);
3658 ssSetDWorkUsedAsDState(childS, 1, 1);
3659 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 163))[0]);
3660
3661 /* DWORK2 */
3662 ssSetDWorkWidth(childS, 2, 1);
3663 ssSetDWorkDataType(childS, 2,SS_INT8);
3664 ssSetDWorkComplexSignal(childS, 2, 0);
3665 ssSetDWorkUsedAsDState(childS, 2, 1);
3666 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 389))[0]);
3667
3668 /* DWORK3 */
3669 ssSetDWorkWidth(childS, 3, 1);
3670 ssSetDWorkDataType(childS, 3,SS_INT8);
3671 ssSetDWorkComplexSignal(childS, 3, 0);
3672 ssSetDWorkUsedAsDState(childS, 3, 1);
3673 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 390))[0]);
3674 }
3675
3676 /* registration */
3677 IntegratorLimited_sf(childS);
3678 sfcnInitializeSizes(childS);
3679 sfcnInitializeSampleTimes(childS);
3680
3681 /* adjust sample time */
3682 ssSetSampleTime(childS, 0, 0.0);
3683 ssSetOffsetTime(childS, 0, 0.0);
3684 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
3685
3686 /* set compiled values of dynamic vector attributes */
3687 ssSetNumNonsampledZCs(childS, 0);
3688
3689 /* Update connectivity flags for each port */
3690 _ssSetInputPortConnected(childS, 0, 1);
3691 _ssSetInputPortConnected(childS, 1, 1);
3692 _ssSetInputPortConnected(childS, 2, 1);
3693 _ssSetInputPortConnected(childS, 3, 1);
3694 _ssSetInputPortConnected(childS, 4, 1);
3695 _ssSetInputPortConnected(childS, 5, 1);
3696 _ssSetInputPortConnected(childS, 6, 1);
3697 _ssSetOutputPortConnected(childS, 0, 1);
3698 _ssSetOutputPortBeingMerged(childS, 0, 0);
3699
3700 /* Update the BufferDstPort flags for each input port */
3701 _ssSetInputPortBufferDstPort(childS, 0, -1);
3702 _ssSetInputPortBufferDstPort(childS, 1, -1);
3703 _ssSetInputPortBufferDstPort(childS, 2, -1);
3704 _ssSetInputPortBufferDstPort(childS, 3, -1);
3705 _ssSetInputPortBufferDstPort(childS, 4, -1);
3706 _ssSetInputPortBufferDstPort(childS, 5, -1);
3707 _ssSetInputPortBufferDstPort(childS, 6, -1);
3708
3709 /* Instance data for generated S-Function: IntegratorLimited */
3710 {
3711 SimStruct *rts = childS;
3712
3713#include "IntegratorLimited_sfcn_rtw/IntegratorLimited_sid.h"
3714
3715 }
3716 }
3717
3718 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S91>/Generated S-Function1 (SaturationLimiter_sf) */
3719 {
3720 SimStruct *childS = ssGetSFunction(rts, 20);
3721
3722 /* timing info */
3723 static time_T sfcnPeriod[1];
3724 static time_T sfcnOffset[1];
3725 static int_T sfcnTsMap[1];
3726 (void) memset((void*)sfcnPeriod, 0,
3727 sizeof(time_T)*1);
3728 (void) memset((void*)sfcnOffset, 0,
3729 sizeof(time_T)*1);
3730 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
3731 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
3732 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
3733
3734 /* Set up the mdlInfo pointer */
3735# ifdef USE_RTMODEL
3736
3737 {
3738 static struct _ssBlkInfo2 _blkInfo2;
3739 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
3740 ssSetBlkInfo2Ptr(childS, blkInfo2);
3741 }
3742
3743 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
3744
3745# else
3746
3747 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
3748
3749# endif /* USE_RTMODEL */
3750
3751 /* Allocate memory of model methods 2 */
3752 {
3753 static struct _ssSFcnModelMethods2 methods2;
3754 ssSetModelMethods2(childS, &methods2);
3755 }
3756
3757 /* Allocate memory of model methods 3 */
3758 {
3759 static struct _ssSFcnModelMethods3 methods3;
3760 ssSetModelMethods3(childS, &methods3);
3761 }
3762
3763 /* Allocate memory for states auxilliary information */
3764 {
3765 static struct _ssStatesInfo2 statesInfo2;
3766 static ssPeriodicStatesInfo periodicStatesInfo;
3767 ssSetStatesInfo2(childS, &statesInfo2);
3768 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
3769 }
3770
3771 /* inputs */
3772 {
3773 static struct _ssPortInputs inputPortInfo[3];
3774 _ssSetNumInputPorts(childS, 3);
3775 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
3776
3777 /* port 0 */
3778 {
3779 static real32_T const *sfcnUPtrs[1];
3780 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
3781 ssGetLocalBlockIO(rts))->Sum1_j;
3782 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
3783 _ssSetInputPortNumDimensions(childS, 0, 1);
3784 ssSetInputPortWidth(childS, 0, 1);
3785 }
3786
3787 /* port 1 */
3788 {
3789 static real32_T const *sfcnUPtrs[1];
3790 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled111;
3791 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
3792 _ssSetInputPortNumDimensions(childS, 1, 1);
3793 ssSetInputPortWidth(childS, 1, 1);
3794 }
3795
3796 /* port 2 */
3797 {
3798 static real32_T const *sfcnUPtrs[1];
3799 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled112;
3800 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
3801 _ssSetInputPortNumDimensions(childS, 2, 1);
3802 ssSetInputPortWidth(childS, 2, 1);
3803 }
3804 }
3805
3806 /* outputs */
3807 {
3808 static struct _ssPortOutputs outputPortInfo[1];
3809 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
3810 _ssSetNumOutputPorts(childS, 1);
3811
3812 /* port 0 */
3813 {
3814 _ssSetOutputPortNumDimensions(childS, 0, 1);
3815 ssSetOutputPortWidth(childS, 0, 1);
3816 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
3817 *) ssGetLocalBlockIO(rts))->GeneratedSFunction1_h));
3818 }
3819 }
3820
3821 /* path info */
3822 _ssSetModelName(childS, "SaturationLimiter_sf");
3823 _ssSetPath(childS,
3824 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/appcLcontrol/AltLControl/Saturation Limiter1/Generated S-Function1");
3825 if (ssGetRTModel(rts) == (NULL)) {
3826 _ssSetParentSS(childS, rts);
3827 _ssSetRootSS(childS, ssGetRootSS(rts));
3828 } else {
3829 ssSetRTModel(childS,ssGetRTModel(rts));
3830 _ssSetParentSS(childS, (NULL));
3831 _ssSetRootSS(childS, childS);
3832 }
3833
3834 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
3835
3836 /* registration */
3837 SaturationLimiter_sf(childS);
3838 sfcnInitializeSizes(childS);
3839 sfcnInitializeSampleTimes(childS);
3840
3841 /* adjust sample time */
3842 ssSetSampleTime(childS, 0, 0.0);
3843 ssSetOffsetTime(childS, 0, 0.0);
3844 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
3845
3846 /* set compiled values of dynamic vector attributes */
3847 ssSetNumNonsampledZCs(childS, 0);
3848
3849 /* Update connectivity flags for each port */
3850 _ssSetInputPortConnected(childS, 0, 1);
3851 _ssSetInputPortConnected(childS, 1, 1);
3852 _ssSetInputPortConnected(childS, 2, 1);
3853 _ssSetOutputPortConnected(childS, 0, 1);
3854 _ssSetOutputPortBeingMerged(childS, 0, 0);
3855
3856 /* Update the BufferDstPort flags for each input port */
3857 _ssSetInputPortBufferDstPort(childS, 0, -1);
3858 _ssSetInputPortBufferDstPort(childS, 1, -1);
3859 _ssSetInputPortBufferDstPort(childS, 2, -1);
3860
3861 /* Instance data for generated S-Function: SaturationLimiter */
3862 {
3863 SimStruct *rts = childS;
3864
3865#include "SaturationLimiter_sfcn_rtw/SaturationLimiter_sid.h"
3866
3867 }
3868 }
3869
3870 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S95>/Generated S-Function (Gain_sf) */
3871 {
3872 SimStruct *childS = ssGetSFunction(rts, 21);
3873
3874 /* timing info */
3875 static time_T sfcnPeriod[1];
3876 static time_T sfcnOffset[1];
3877 static int_T sfcnTsMap[1];
3878 (void) memset((void*)sfcnPeriod, 0,
3879 sizeof(time_T)*1);
3880 (void) memset((void*)sfcnOffset, 0,
3881 sizeof(time_T)*1);
3882 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
3883 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
3884 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
3885
3886 /* Set up the mdlInfo pointer */
3887# ifdef USE_RTMODEL
3888
3889 {
3890 static struct _ssBlkInfo2 _blkInfo2;
3891 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
3892 ssSetBlkInfo2Ptr(childS, blkInfo2);
3893 }
3894
3895 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
3896
3897# else
3898
3899 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
3900
3901# endif /* USE_RTMODEL */
3902
3903 /* Allocate memory of model methods 2 */
3904 {
3905 static struct _ssSFcnModelMethods2 methods2;
3906 ssSetModelMethods2(childS, &methods2);
3907 }
3908
3909 /* Allocate memory of model methods 3 */
3910 {
3911 static struct _ssSFcnModelMethods3 methods3;
3912 ssSetModelMethods3(childS, &methods3);
3913 }
3914
3915 /* Allocate memory for states auxilliary information */
3916 {
3917 static struct _ssStatesInfo2 statesInfo2;
3918 static ssPeriodicStatesInfo periodicStatesInfo;
3919 ssSetStatesInfo2(childS, &statesInfo2);
3920 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
3921 }
3922
3923 /* inputs */
3924 {
3925 static struct _ssPortInputs inputPortInfo[2];
3926 _ssSetNumInputPorts(childS, 2);
3927 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
3928
3929 /* port 0 */
3930 {
3931 static real32_T const *sfcnUPtrs[1];
3932 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
3933 ssGetLocalBlockIO(rts))->GeneratedSFunction1_h;
3934 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
3935 _ssSetInputPortNumDimensions(childS, 0, 1);
3936 ssSetInputPortWidth(childS, 0, 1);
3937 }
3938
3939 /* port 1 */
3940 {
3941 static real32_T const *sfcnUPtrs[1];
3942 sfcnUPtrs[0] = (real32_T const *)
3943 &AFCS_MODEL1_ConstP.Constant13_Value_n;
3944 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
3945 _ssSetInputPortNumDimensions(childS, 1, 1);
3946 ssSetInputPortWidth(childS, 1, 1);
3947 }
3948 }
3949
3950 /* outputs */
3951 {
3952 static struct _ssPortOutputs outputPortInfo[1];
3953 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
3954 _ssSetNumOutputPorts(childS, 1);
3955
3956 /* port 0 */
3957 {
3958 _ssSetOutputPortNumDimensions(childS, 0, 1);
3959 ssSetOutputPortWidth(childS, 0, 1);
3960 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
3961 *) ssGetLocalBlockIO(rts))->Saturation8));
3962 }
3963 }
3964
3965 /* path info */
3966 _ssSetModelName(childS, "Gain_sf");
3967 _ssSetPath(childS,
3968 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/appcLcontrol/AltLControl/gain/Generated S-Function");
3969 if (ssGetRTModel(rts) == (NULL)) {
3970 _ssSetParentSS(childS, rts);
3971 _ssSetRootSS(childS, ssGetRootSS(rts));
3972 } else {
3973 ssSetRTModel(childS,ssGetRTModel(rts));
3974 _ssSetParentSS(childS, (NULL));
3975 _ssSetRootSS(childS, childS);
3976 }
3977
3978 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
3979
3980 /* registration */
3981 Gain_sf(childS);
3982 sfcnInitializeSizes(childS);
3983 sfcnInitializeSampleTimes(childS);
3984
3985 /* adjust sample time */
3986 ssSetSampleTime(childS, 0, 0.0);
3987 ssSetOffsetTime(childS, 0, 0.0);
3988 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
3989
3990 /* set compiled values of dynamic vector attributes */
3991 ssSetNumNonsampledZCs(childS, 0);
3992
3993 /* Update connectivity flags for each port */
3994 _ssSetInputPortConnected(childS, 0, 1);
3995 _ssSetInputPortConnected(childS, 1, 1);
3996 _ssSetOutputPortConnected(childS, 0, 1);
3997 _ssSetOutputPortBeingMerged(childS, 0, 0);
3998
3999 /* Update the BufferDstPort flags for each input port */
4000 _ssSetInputPortBufferDstPort(childS, 0, -1);
4001 _ssSetInputPortBufferDstPort(childS, 1, -1);
4002
4003 /* Instance data for generated S-Function: Gain */
4004 {
4005 SimStruct *rts = childS;
4006
4007#include "Gain_sfcn_rtw/Gain_sid.h"
4008
4009 }
4010 }
4011
4012 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S90>/Generated S-Function2 (LeadLagFilter_sf) */
4013 {
4014 SimStruct *childS = ssGetSFunction(rts, 22);
4015
4016 /* timing info */
4017 static time_T sfcnPeriod[1];
4018 static time_T sfcnOffset[1];
4019 static int_T sfcnTsMap[1];
4020 (void) memset((void*)sfcnPeriod, 0,
4021 sizeof(time_T)*1);
4022 (void) memset((void*)sfcnOffset, 0,
4023 sizeof(time_T)*1);
4024 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
4025 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
4026 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
4027
4028 /* Set up the mdlInfo pointer */
4029# ifdef USE_RTMODEL
4030
4031 {
4032 static struct _ssBlkInfo2 _blkInfo2;
4033 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
4034 ssSetBlkInfo2Ptr(childS, blkInfo2);
4035 }
4036
4037 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
4038
4039# else
4040
4041 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
4042
4043# endif /* USE_RTMODEL */
4044
4045 /* Allocate memory of model methods 2 */
4046 {
4047 static struct _ssSFcnModelMethods2 methods2;
4048 ssSetModelMethods2(childS, &methods2);
4049 }
4050
4051 /* Allocate memory of model methods 3 */
4052 {
4053 static struct _ssSFcnModelMethods3 methods3;
4054 ssSetModelMethods3(childS, &methods3);
4055 }
4056
4057 /* Allocate memory for states auxilliary information */
4058 {
4059 static struct _ssStatesInfo2 statesInfo2;
4060 static ssPeriodicStatesInfo periodicStatesInfo;
4061 ssSetStatesInfo2(childS, &statesInfo2);
4062 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
4063 }
4064
4065 /* inputs */
4066 {
4067 static struct _ssPortInputs inputPortInfo[7];
4068 _ssSetNumInputPorts(childS, 7);
4069 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
4070
4071 /* port 0 */
4072 {
4073 static real32_T const *sfcnUPtrs[1];
4074 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
4075 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReuseS;
4076 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
4077 _ssSetInputPortNumDimensions(childS, 0, 1);
4078 ssSetInputPortWidth(childS, 0, 1);
4079 }
4080
4081 /* port 1 */
4082 {
4083 static int8_T const *sfcnUPtrs[1];
4084 sfcnUPtrs[0] = (int8_T const *) &((B_AFCS_MODEL1_T *)
4085 ssGetLocalBlockIO(rts))->DataTypeConversion3_c;
4086 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
4087 _ssSetInputPortNumDimensions(childS, 1, 1);
4088 ssSetInputPortWidth(childS, 1, 1);
4089 }
4090
4091 /* port 2 */
4092 {
4093 static real32_T const *sfcnUPtrs[1];
4094 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled105;
4095 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
4096 _ssSetInputPortNumDimensions(childS, 2, 1);
4097 ssSetInputPortWidth(childS, 2, 1);
4098 }
4099
4100 /* port 3 */
4101 {
4102 static real32_T const *sfcnUPtrs[1];
4103 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled113;
4104 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
4105 _ssSetInputPortNumDimensions(childS, 3, 1);
4106 ssSetInputPortWidth(childS, 3, 1);
4107 }
4108
4109 /* port 4 */
4110 {
4111 static real32_T const *sfcnUPtrs[1];
4112 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
4113 ssGetLocalBlockIO(rts))->Switch_aj;
4114 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
4115 _ssSetInputPortNumDimensions(childS, 4, 1);
4116 ssSetInputPortWidth(childS, 4, 1);
4117 }
4118
4119 /* port 5 */
4120 {
4121 static real32_T const *sfcnUPtrs[1];
4122 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
4123 ssGetLocalBlockIO(rts))->Switch_aj;
4124 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
4125 _ssSetInputPortNumDimensions(childS, 5, 1);
4126 ssSetInputPortWidth(childS, 5, 1);
4127 }
4128
4129 /* port 6 */
4130 {
4131 static real32_T const *sfcnUPtrs[1];
4132 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
4133 ssGetLocalBlockIO(rts))->Divide;
4134 _ssSetInputPortSignalPtrs(childS, 6, (InputPtrsType)&sfcnUPtrs[0]);
4135 _ssSetInputPortNumDimensions(childS, 6, 1);
4136 ssSetInputPortWidth(childS, 6, 1);
4137 }
4138 }
4139
4140 /* outputs */
4141 {
4142 static struct _ssPortOutputs outputPortInfo[1];
4143 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
4144 _ssSetNumOutputPorts(childS, 1);
4145
4146 /* port 0 */
4147 {
4148 _ssSetOutputPortNumDimensions(childS, 0, 1);
4149 ssSetOutputPortWidth(childS, 0, 1);
4150 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
4151 *) ssGetLocalBlockIO(rts))->GeneratedSFunction2));
4152 }
4153 }
4154
4155 /* path info */
4156 _ssSetModelName(childS, "LeadLagFilter_sf");
4157 _ssSetPath(childS,
4158 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/appcLcontrol/AltLControl/Lead lag/Generated S-Function2");
4159 if (ssGetRTModel(rts) == (NULL)) {
4160 _ssSetParentSS(childS, rts);
4161 _ssSetRootSS(childS, ssGetRootSS(rts));
4162 } else {
4163 ssSetRTModel(childS,ssGetRTModel(rts));
4164 _ssSetParentSS(childS, (NULL));
4165 _ssSetRootSS(childS, childS);
4166 }
4167
4168 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
4169
4170 /* work vectors */
4171 {
4172 static struct _ssDWorkRecord dWorkRecord[4];
4173 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
4174 ssSetSFcnDWork(childS, dWorkRecord);
4175 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
4176 _ssSetNumDWork(childS, 4);
4177
4178 /* DWORK0 */
4179 ssSetDWorkWidth(childS, 0, 1);
4180 ssSetDWorkDataType(childS, 0,SS_SINGLE);
4181 ssSetDWorkComplexSignal(childS, 0, 0);
4182 ssSetDWorkUsedAsDState(childS, 0, 1);
4183 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 164))[0]);
4184
4185 /* DWORK1 */
4186 ssSetDWorkWidth(childS, 1, 1);
4187 ssSetDWorkDataType(childS, 1,SS_SINGLE);
4188 ssSetDWorkComplexSignal(childS, 1, 0);
4189 ssSetDWorkUsedAsDState(childS, 1, 1);
4190 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 165))[0]);
4191
4192 /* DWORK2 */
4193 ssSetDWorkWidth(childS, 2, 1);
4194 ssSetDWorkDataType(childS, 2,SS_INT8);
4195 ssSetDWorkComplexSignal(childS, 2, 0);
4196 ssSetDWorkUsedAsDState(childS, 2, 1);
4197 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 391))[0]);
4198
4199 /* DWORK3 */
4200 ssSetDWorkWidth(childS, 3, 1);
4201 ssSetDWorkDataType(childS, 3,SS_INT8);
4202 ssSetDWorkComplexSignal(childS, 3, 0);
4203 ssSetDWorkUsedAsDState(childS, 3, 1);
4204 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 392))[0]);
4205 }
4206
4207 /* registration */
4208 LeadLagFilter_sf(childS);
4209 sfcnInitializeSizes(childS);
4210 sfcnInitializeSampleTimes(childS);
4211
4212 /* adjust sample time */
4213 ssSetSampleTime(childS, 0, 0.0);
4214 ssSetOffsetTime(childS, 0, 0.0);
4215 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
4216
4217 /* set compiled values of dynamic vector attributes */
4218 ssSetNumNonsampledZCs(childS, 0);
4219
4220 /* Update connectivity flags for each port */
4221 _ssSetInputPortConnected(childS, 0, 1);
4222 _ssSetInputPortConnected(childS, 1, 1);
4223 _ssSetInputPortConnected(childS, 2, 1);
4224 _ssSetInputPortConnected(childS, 3, 1);
4225 _ssSetInputPortConnected(childS, 4, 1);
4226 _ssSetInputPortConnected(childS, 5, 1);
4227 _ssSetInputPortConnected(childS, 6, 1);
4228 _ssSetOutputPortConnected(childS, 0, 1);
4229 _ssSetOutputPortBeingMerged(childS, 0, 0);
4230
4231 /* Update the BufferDstPort flags for each input port */
4232 _ssSetInputPortBufferDstPort(childS, 0, -1);
4233 _ssSetInputPortBufferDstPort(childS, 1, -1);
4234 _ssSetInputPortBufferDstPort(childS, 2, -1);
4235 _ssSetInputPortBufferDstPort(childS, 3, -1);
4236 _ssSetInputPortBufferDstPort(childS, 4, -1);
4237 _ssSetInputPortBufferDstPort(childS, 5, -1);
4238 _ssSetInputPortBufferDstPort(childS, 6, -1);
4239
4240 /* Instance data for generated S-Function: LeadLagFilter */
4241 {
4242 SimStruct *rts = childS;
4243
4244#include "LeadLagFilter_sfcn_rtw/LeadLagFilter_sid.h"
4245
4246 }
4247 }
4248
4249 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S94>/Generated S-Function1 (SaturationLimiter_sf) */
4250 {
4251 SimStruct *childS = ssGetSFunction(rts, 23);
4252
4253 /* timing info */
4254 static time_T sfcnPeriod[1];
4255 static time_T sfcnOffset[1];
4256 static int_T sfcnTsMap[1];
4257 (void) memset((void*)sfcnPeriod, 0,
4258 sizeof(time_T)*1);
4259 (void) memset((void*)sfcnOffset, 0,
4260 sizeof(time_T)*1);
4261 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
4262 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
4263 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
4264
4265 /* Set up the mdlInfo pointer */
4266# ifdef USE_RTMODEL
4267
4268 {
4269 static struct _ssBlkInfo2 _blkInfo2;
4270 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
4271 ssSetBlkInfo2Ptr(childS, blkInfo2);
4272 }
4273
4274 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
4275
4276# else
4277
4278 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
4279
4280# endif /* USE_RTMODEL */
4281
4282 /* Allocate memory of model methods 2 */
4283 {
4284 static struct _ssSFcnModelMethods2 methods2;
4285 ssSetModelMethods2(childS, &methods2);
4286 }
4287
4288 /* Allocate memory of model methods 3 */
4289 {
4290 static struct _ssSFcnModelMethods3 methods3;
4291 ssSetModelMethods3(childS, &methods3);
4292 }
4293
4294 /* Allocate memory for states auxilliary information */
4295 {
4296 static struct _ssStatesInfo2 statesInfo2;
4297 static ssPeriodicStatesInfo periodicStatesInfo;
4298 ssSetStatesInfo2(childS, &statesInfo2);
4299 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
4300 }
4301
4302 /* inputs */
4303 {
4304 static struct _ssPortInputs inputPortInfo[3];
4305 _ssSetNumInputPorts(childS, 3);
4306 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
4307
4308 /* port 0 */
4309 {
4310 static real32_T const *sfcnUPtrs[1];
4311 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
4312 ssGetLocalBlockIO(rts))->GeneratedSFunction2;
4313 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
4314 _ssSetInputPortNumDimensions(childS, 0, 1);
4315 ssSetInputPortWidth(childS, 0, 1);
4316 }
4317
4318 /* port 1 */
4319 {
4320 static real32_T const *sfcnUPtrs[1];
4321 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
4322 ssGetLocalBlockIO(rts))->Product1_m;
4323 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
4324 _ssSetInputPortNumDimensions(childS, 1, 1);
4325 ssSetInputPortWidth(childS, 1, 1);
4326 }
4327
4328 /* port 2 */
4329 {
4330 static real32_T const *sfcnUPtrs[1];
4331 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
4332 ssGetLocalBlockIO(rts))->Product_pp;
4333 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
4334 _ssSetInputPortNumDimensions(childS, 2, 1);
4335 ssSetInputPortWidth(childS, 2, 1);
4336 }
4337 }
4338
4339 /* outputs */
4340 {
4341 static struct _ssPortOutputs outputPortInfo[1];
4342 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
4343 _ssSetNumOutputPorts(childS, 1);
4344
4345 /* port 0 */
4346 {
4347 _ssSetOutputPortNumDimensions(childS, 0, 1);
4348 ssSetOutputPortWidth(childS, 0, 1);
4349 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
4350 *) ssGetLocalBlockIO(rts))->GeneratedSFunction1_b));
4351 }
4352 }
4353
4354 /* path info */
4355 _ssSetModelName(childS, "SaturationLimiter_sf");
4356 _ssSetPath(childS,
4357 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/appcLcontrol/AltLControl/Saturation Limiter4/Generated S-Function1");
4358 if (ssGetRTModel(rts) == (NULL)) {
4359 _ssSetParentSS(childS, rts);
4360 _ssSetRootSS(childS, ssGetRootSS(rts));
4361 } else {
4362 ssSetRTModel(childS,ssGetRTModel(rts));
4363 _ssSetParentSS(childS, (NULL));
4364 _ssSetRootSS(childS, childS);
4365 }
4366
4367 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
4368
4369 /* registration */
4370 SaturationLimiter_sf(childS);
4371 sfcnInitializeSizes(childS);
4372 sfcnInitializeSampleTimes(childS);
4373
4374 /* adjust sample time */
4375 ssSetSampleTime(childS, 0, 0.0);
4376 ssSetOffsetTime(childS, 0, 0.0);
4377 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
4378
4379 /* set compiled values of dynamic vector attributes */
4380 ssSetNumNonsampledZCs(childS, 0);
4381
4382 /* Update connectivity flags for each port */
4383 _ssSetInputPortConnected(childS, 0, 1);
4384 _ssSetInputPortConnected(childS, 1, 1);
4385 _ssSetInputPortConnected(childS, 2, 1);
4386 _ssSetOutputPortConnected(childS, 0, 1);
4387 _ssSetOutputPortBeingMerged(childS, 0, 0);
4388
4389 /* Update the BufferDstPort flags for each input port */
4390 _ssSetInputPortBufferDstPort(childS, 0, -1);
4391 _ssSetInputPortBufferDstPort(childS, 1, -1);
4392 _ssSetInputPortBufferDstPort(childS, 2, -1);
4393
4394 /* Instance data for generated S-Function: SaturationLimiter */
4395 {
4396 SimStruct *rts = childS;
4397
4398#include "SaturationLimiter_sfcn_rtw/SaturationLimiter_sid.h"
4399
4400 }
4401 }
4402
4403 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S87>/Generated S-Function4 (LagFilter_sf) */
4404 {
4405 SimStruct *childS = ssGetSFunction(rts, 24);
4406
4407 /* timing info */
4408 static time_T sfcnPeriod[1];
4409 static time_T sfcnOffset[1];
4410 static int_T sfcnTsMap[1];
4411 (void) memset((void*)sfcnPeriod, 0,
4412 sizeof(time_T)*1);
4413 (void) memset((void*)sfcnOffset, 0,
4414 sizeof(time_T)*1);
4415 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
4416 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
4417 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
4418
4419 /* Set up the mdlInfo pointer */
4420# ifdef USE_RTMODEL
4421
4422 {
4423 static struct _ssBlkInfo2 _blkInfo2;
4424 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
4425 ssSetBlkInfo2Ptr(childS, blkInfo2);
4426 }
4427
4428 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
4429
4430# else
4431
4432 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
4433
4434# endif /* USE_RTMODEL */
4435
4436 /* Allocate memory of model methods 2 */
4437 {
4438 static struct _ssSFcnModelMethods2 methods2;
4439 ssSetModelMethods2(childS, &methods2);
4440 }
4441
4442 /* Allocate memory of model methods 3 */
4443 {
4444 static struct _ssSFcnModelMethods3 methods3;
4445 ssSetModelMethods3(childS, &methods3);
4446 }
4447
4448 /* Allocate memory for states auxilliary information */
4449 {
4450 static struct _ssStatesInfo2 statesInfo2;
4451 static ssPeriodicStatesInfo periodicStatesInfo;
4452 ssSetStatesInfo2(childS, &statesInfo2);
4453 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
4454 }
4455
4456 /* inputs */
4457 {
4458 static struct _ssPortInputs inputPortInfo[6];
4459 _ssSetNumInputPorts(childS, 6);
4460 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
4461
4462 /* port 0 */
4463 {
4464 static real32_T const *sfcnUPtrs[1];
4465 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
4466 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReuseS;
4467 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
4468 _ssSetInputPortNumDimensions(childS, 0, 1);
4469 ssSetInputPortWidth(childS, 0, 1);
4470 }
4471
4472 /* port 1 */
4473 {
4474 static int8_T const *sfcnUPtrs[1];
4475 sfcnUPtrs[0] = (int8_T const *) &((B_AFCS_MODEL1_T *)
4476 ssGetLocalBlockIO(rts))->DataTypeConversion3_c;
4477 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
4478 _ssSetInputPortNumDimensions(childS, 1, 1);
4479 ssSetInputPortWidth(childS, 1, 1);
4480 }
4481
4482 /* port 2 */
4483 {
4484 static real32_T const *sfcnUPtrs[1];
4485 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled107;
4486 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
4487 _ssSetInputPortNumDimensions(childS, 2, 1);
4488 ssSetInputPortWidth(childS, 2, 1);
4489 }
4490
4491 /* port 3 */
4492 {
4493 static real32_T const *sfcnUPtrs[1];
4494 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
4495 ssGetLocalBlockIO(rts))->Switch_aj;
4496 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
4497 _ssSetInputPortNumDimensions(childS, 3, 1);
4498 ssSetInputPortWidth(childS, 3, 1);
4499 }
4500
4501 /* port 4 */
4502 {
4503 static real32_T const *sfcnUPtrs[1];
4504 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
4505 ssGetLocalBlockIO(rts))->Switch_aj;
4506 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
4507 _ssSetInputPortNumDimensions(childS, 4, 1);
4508 ssSetInputPortWidth(childS, 4, 1);
4509 }
4510
4511 /* port 5 */
4512 {
4513 static real32_T const *sfcnUPtrs[1];
4514 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
4515 ssGetLocalBlockIO(rts))->GeneratedSFunction1_b;
4516 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
4517 _ssSetInputPortNumDimensions(childS, 5, 1);
4518 ssSetInputPortWidth(childS, 5, 1);
4519 }
4520 }
4521
4522 /* outputs */
4523 {
4524 static struct _ssPortOutputs outputPortInfo[1];
4525 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
4526 _ssSetNumOutputPorts(childS, 1);
4527
4528 /* port 0 */
4529 {
4530 _ssSetOutputPortNumDimensions(childS, 0, 1);
4531 ssSetOutputPortWidth(childS, 0, 1);
4532 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
4533 *) ssGetLocalBlockIO(rts))->GeneratedSFunction4));
4534 }
4535 }
4536
4537 /* path info */
4538 _ssSetModelName(childS, "LagFilter_sf");
4539 _ssSetPath(childS,
4540 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/appcLcontrol/AltLControl/ lag filter/Generated S-Function4");
4541 if (ssGetRTModel(rts) == (NULL)) {
4542 _ssSetParentSS(childS, rts);
4543 _ssSetRootSS(childS, ssGetRootSS(rts));
4544 } else {
4545 ssSetRTModel(childS,ssGetRTModel(rts));
4546 _ssSetParentSS(childS, (NULL));
4547 _ssSetRootSS(childS, childS);
4548 }
4549
4550 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
4551
4552 /* work vectors */
4553 {
4554 static struct _ssDWorkRecord dWorkRecord[4];
4555 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
4556 ssSetSFcnDWork(childS, dWorkRecord);
4557 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
4558 _ssSetNumDWork(childS, 4);
4559
4560 /* DWORK0 */
4561 ssSetDWorkWidth(childS, 0, 1);
4562 ssSetDWorkDataType(childS, 0,SS_SINGLE);
4563 ssSetDWorkComplexSignal(childS, 0, 0);
4564 ssSetDWorkUsedAsDState(childS, 0, 1);
4565 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 166))[0]);
4566
4567 /* DWORK1 */
4568 ssSetDWorkWidth(childS, 1, 1);
4569 ssSetDWorkDataType(childS, 1,SS_SINGLE);
4570 ssSetDWorkComplexSignal(childS, 1, 0);
4571 ssSetDWorkUsedAsDState(childS, 1, 1);
4572 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 167))[0]);
4573
4574 /* DWORK2 */
4575 ssSetDWorkWidth(childS, 2, 1);
4576 ssSetDWorkDataType(childS, 2,SS_INT8);
4577 ssSetDWorkComplexSignal(childS, 2, 0);
4578 ssSetDWorkUsedAsDState(childS, 2, 1);
4579 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 393))[0]);
4580
4581 /* DWORK3 */
4582 ssSetDWorkWidth(childS, 3, 1);
4583 ssSetDWorkDataType(childS, 3,SS_INT8);
4584 ssSetDWorkComplexSignal(childS, 3, 0);
4585 ssSetDWorkUsedAsDState(childS, 3, 1);
4586 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 394))[0]);
4587 }
4588
4589 /* registration */
4590 LagFilter_sf(childS);
4591 sfcnInitializeSizes(childS);
4592 sfcnInitializeSampleTimes(childS);
4593
4594 /* adjust sample time */
4595 ssSetSampleTime(childS, 0, 0.0);
4596 ssSetOffsetTime(childS, 0, 0.0);
4597 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
4598
4599 /* set compiled values of dynamic vector attributes */
4600 ssSetNumNonsampledZCs(childS, 0);
4601
4602 /* Update connectivity flags for each port */
4603 _ssSetInputPortConnected(childS, 0, 1);
4604 _ssSetInputPortConnected(childS, 1, 1);
4605 _ssSetInputPortConnected(childS, 2, 1);
4606 _ssSetInputPortConnected(childS, 3, 1);
4607 _ssSetInputPortConnected(childS, 4, 1);
4608 _ssSetInputPortConnected(childS, 5, 1);
4609 _ssSetOutputPortConnected(childS, 0, 1);
4610 _ssSetOutputPortBeingMerged(childS, 0, 0);
4611
4612 /* Update the BufferDstPort flags for each input port */
4613 _ssSetInputPortBufferDstPort(childS, 0, -1);
4614 _ssSetInputPortBufferDstPort(childS, 1, -1);
4615 _ssSetInputPortBufferDstPort(childS, 2, -1);
4616 _ssSetInputPortBufferDstPort(childS, 3, -1);
4617 _ssSetInputPortBufferDstPort(childS, 4, -1);
4618 _ssSetInputPortBufferDstPort(childS, 5, -1);
4619
4620 /* Instance data for generated S-Function: LagFilter */
4621 {
4622 SimStruct *rts = childS;
4623
4624#include "LagFilter_sfcn_rtw/LagFilter_sid.h"
4625
4626 }
4627 }
4628
4629 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S114>/Generated S-Function (SaturationLimiter_sf) */
4630 {
4631 SimStruct *childS = ssGetSFunction(rts, 25);
4632
4633 /* timing info */
4634 static time_T sfcnPeriod[1];
4635 static time_T sfcnOffset[1];
4636 static int_T sfcnTsMap[1];
4637 (void) memset((void*)sfcnPeriod, 0,
4638 sizeof(time_T)*1);
4639 (void) memset((void*)sfcnOffset, 0,
4640 sizeof(time_T)*1);
4641 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
4642 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
4643 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
4644
4645 /* Set up the mdlInfo pointer */
4646# ifdef USE_RTMODEL
4647
4648 {
4649 static struct _ssBlkInfo2 _blkInfo2;
4650 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
4651 ssSetBlkInfo2Ptr(childS, blkInfo2);
4652 }
4653
4654 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
4655
4656# else
4657
4658 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
4659
4660# endif /* USE_RTMODEL */
4661
4662 /* Allocate memory of model methods 2 */
4663 {
4664 static struct _ssSFcnModelMethods2 methods2;
4665 ssSetModelMethods2(childS, &methods2);
4666 }
4667
4668 /* Allocate memory of model methods 3 */
4669 {
4670 static struct _ssSFcnModelMethods3 methods3;
4671 ssSetModelMethods3(childS, &methods3);
4672 }
4673
4674 /* Allocate memory for states auxilliary information */
4675 {
4676 static struct _ssStatesInfo2 statesInfo2;
4677 static ssPeriodicStatesInfo periodicStatesInfo;
4678 ssSetStatesInfo2(childS, &statesInfo2);
4679 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
4680 }
4681
4682 /* inputs */
4683 {
4684 static struct _ssPortInputs inputPortInfo[3];
4685 _ssSetNumInputPorts(childS, 3);
4686 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
4687
4688 /* port 0 */
4689 {
4690 static real32_T const *sfcnUPtrs[1];
4691 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled106;
4692 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
4693 _ssSetInputPortNumDimensions(childS, 0, 1);
4694 ssSetInputPortWidth(childS, 0, 1);
4695 }
4696
4697 /* port 1 */
4698 {
4699 static real32_T const *sfcnUPtrs[1];
4700 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
4701 ssGetLocalBlockIO(rts))->Product1_m;
4702 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
4703 _ssSetInputPortNumDimensions(childS, 1, 1);
4704 ssSetInputPortWidth(childS, 1, 1);
4705 }
4706
4707 /* port 2 */
4708 {
4709 static real32_T const *sfcnUPtrs[1];
4710 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
4711 ssGetLocalBlockIO(rts))->Product_pp;
4712 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
4713 _ssSetInputPortNumDimensions(childS, 2, 1);
4714 ssSetInputPortWidth(childS, 2, 1);
4715 }
4716 }
4717
4718 /* outputs */
4719 {
4720 static struct _ssPortOutputs outputPortInfo[1];
4721 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
4722 _ssSetNumOutputPorts(childS, 1);
4723
4724 /* port 0 */
4725 {
4726 _ssSetOutputPortNumDimensions(childS, 0, 1);
4727 ssSetOutputPortWidth(childS, 0, 1);
4728 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
4729 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_kz));
4730 }
4731 }
4732
4733 /* path info */
4734 _ssSetModelName(childS, "SaturationLimiter_sf");
4735 _ssSetPath(childS,
4736 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/appcLcontrol/NzControl/Saturation Limiter1/Generated S-Function");
4737 if (ssGetRTModel(rts) == (NULL)) {
4738 _ssSetParentSS(childS, rts);
4739 _ssSetRootSS(childS, ssGetRootSS(rts));
4740 } else {
4741 ssSetRTModel(childS,ssGetRTModel(rts));
4742 _ssSetParentSS(childS, (NULL));
4743 _ssSetRootSS(childS, childS);
4744 }
4745
4746 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
4747
4748 /* registration */
4749 SaturationLimiter_sf(childS);
4750 sfcnInitializeSizes(childS);
4751 sfcnInitializeSampleTimes(childS);
4752
4753 /* adjust sample time */
4754 ssSetSampleTime(childS, 0, 0.0);
4755 ssSetOffsetTime(childS, 0, 0.0);
4756 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
4757
4758 /* set compiled values of dynamic vector attributes */
4759 ssSetNumNonsampledZCs(childS, 0);
4760
4761 /* Update connectivity flags for each port */
4762 _ssSetInputPortConnected(childS, 0, 1);
4763 _ssSetInputPortConnected(childS, 1, 1);
4764 _ssSetInputPortConnected(childS, 2, 1);
4765 _ssSetOutputPortConnected(childS, 0, 1);
4766 _ssSetOutputPortBeingMerged(childS, 0, 0);
4767
4768 /* Update the BufferDstPort flags for each input port */
4769 _ssSetInputPortBufferDstPort(childS, 0, -1);
4770 _ssSetInputPortBufferDstPort(childS, 1, -1);
4771 _ssSetInputPortBufferDstPort(childS, 2, -1);
4772
4773 /* Instance data for generated S-Function: SaturationLimiter */
4774 {
4775 SimStruct *rts = childS;
4776
4777#include "SaturationLimiter_sfcn_rtw/SaturationLimiter_sid.h"
4778
4779 }
4780 }
4781
4782 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S113>/Generated S-Function (LagFilter_sf) */
4783 {
4784 SimStruct *childS = ssGetSFunction(rts, 26);
4785
4786 /* timing info */
4787 static time_T sfcnPeriod[1];
4788 static time_T sfcnOffset[1];
4789 static int_T sfcnTsMap[1];
4790 (void) memset((void*)sfcnPeriod, 0,
4791 sizeof(time_T)*1);
4792 (void) memset((void*)sfcnOffset, 0,
4793 sizeof(time_T)*1);
4794 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
4795 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
4796 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
4797
4798 /* Set up the mdlInfo pointer */
4799# ifdef USE_RTMODEL
4800
4801 {
4802 static struct _ssBlkInfo2 _blkInfo2;
4803 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
4804 ssSetBlkInfo2Ptr(childS, blkInfo2);
4805 }
4806
4807 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
4808
4809# else
4810
4811 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
4812
4813# endif /* USE_RTMODEL */
4814
4815 /* Allocate memory of model methods 2 */
4816 {
4817 static struct _ssSFcnModelMethods2 methods2;
4818 ssSetModelMethods2(childS, &methods2);
4819 }
4820
4821 /* Allocate memory of model methods 3 */
4822 {
4823 static struct _ssSFcnModelMethods3 methods3;
4824 ssSetModelMethods3(childS, &methods3);
4825 }
4826
4827 /* Allocate memory for states auxilliary information */
4828 {
4829 static struct _ssStatesInfo2 statesInfo2;
4830 static ssPeriodicStatesInfo periodicStatesInfo;
4831 ssSetStatesInfo2(childS, &statesInfo2);
4832 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
4833 }
4834
4835 /* inputs */
4836 {
4837 static struct _ssPortInputs inputPortInfo[6];
4838 _ssSetNumInputPorts(childS, 6);
4839 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
4840
4841 /* port 0 */
4842 {
4843 static real32_T const *sfcnUPtrs[1];
4844 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
4845 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReuseS;
4846 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
4847 _ssSetInputPortNumDimensions(childS, 0, 1);
4848 ssSetInputPortWidth(childS, 0, 1);
4849 }
4850
4851 /* port 1 */
4852 {
4853 static int8_T const *sfcnUPtrs[1];
4854 sfcnUPtrs[0] = (int8_T const *) &((B_AFCS_MODEL1_T *)
4855 ssGetLocalBlockIO(rts))->DataTypeConversion_gv;
4856 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
4857 _ssSetInputPortNumDimensions(childS, 1, 1);
4858 ssSetInputPortWidth(childS, 1, 1);
4859 }
4860
4861 /* port 2 */
4862 {
4863 static real32_T const *sfcnUPtrs[1];
4864 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled107;
4865 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
4866 _ssSetInputPortNumDimensions(childS, 2, 1);
4867 ssSetInputPortWidth(childS, 2, 1);
4868 }
4869
4870 /* port 3 */
4871 {
4872 static real32_T const *sfcnUPtrs[1];
4873 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
4874 ssGetLocalBlockIO(rts))->Switch_aj;
4875 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
4876 _ssSetInputPortNumDimensions(childS, 3, 1);
4877 ssSetInputPortWidth(childS, 3, 1);
4878 }
4879
4880 /* port 4 */
4881 {
4882 static real32_T const *sfcnUPtrs[1];
4883 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
4884 ssGetLocalBlockIO(rts))->Switch_aj;
4885 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
4886 _ssSetInputPortNumDimensions(childS, 4, 1);
4887 ssSetInputPortWidth(childS, 4, 1);
4888 }
4889
4890 /* port 5 */
4891 {
4892 static real32_T const *sfcnUPtrs[1];
4893 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
4894 ssGetLocalBlockIO(rts))->GeneratedSFunction_kz;
4895 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
4896 _ssSetInputPortNumDimensions(childS, 5, 1);
4897 ssSetInputPortWidth(childS, 5, 1);
4898 }
4899 }
4900
4901 /* outputs */
4902 {
4903 static struct _ssPortOutputs outputPortInfo[1];
4904 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
4905 _ssSetNumOutputPorts(childS, 1);
4906
4907 /* port 0 */
4908 {
4909 _ssSetOutputPortNumDimensions(childS, 0, 1);
4910 ssSetOutputPortWidth(childS, 0, 1);
4911 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
4912 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_p));
4913 }
4914 }
4915
4916 /* path info */
4917 _ssSetModelName(childS, "LagFilter_sf");
4918 _ssSetPath(childS,
4919 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/appcLcontrol/NzControl/ lag filter/Generated S-Function");
4920 if (ssGetRTModel(rts) == (NULL)) {
4921 _ssSetParentSS(childS, rts);
4922 _ssSetRootSS(childS, ssGetRootSS(rts));
4923 } else {
4924 ssSetRTModel(childS,ssGetRTModel(rts));
4925 _ssSetParentSS(childS, (NULL));
4926 _ssSetRootSS(childS, childS);
4927 }
4928
4929 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
4930
4931 /* work vectors */
4932 {
4933 static struct _ssDWorkRecord dWorkRecord[4];
4934 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
4935 ssSetSFcnDWork(childS, dWorkRecord);
4936 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
4937 _ssSetNumDWork(childS, 4);
4938
4939 /* DWORK0 */
4940 ssSetDWorkWidth(childS, 0, 1);
4941 ssSetDWorkDataType(childS, 0,SS_SINGLE);
4942 ssSetDWorkComplexSignal(childS, 0, 0);
4943 ssSetDWorkUsedAsDState(childS, 0, 1);
4944 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 168))[0]);
4945
4946 /* DWORK1 */
4947 ssSetDWorkWidth(childS, 1, 1);
4948 ssSetDWorkDataType(childS, 1,SS_SINGLE);
4949 ssSetDWorkComplexSignal(childS, 1, 0);
4950 ssSetDWorkUsedAsDState(childS, 1, 1);
4951 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 169))[0]);
4952
4953 /* DWORK2 */
4954 ssSetDWorkWidth(childS, 2, 1);
4955 ssSetDWorkDataType(childS, 2,SS_INT8);
4956 ssSetDWorkComplexSignal(childS, 2, 0);
4957 ssSetDWorkUsedAsDState(childS, 2, 1);
4958 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 395))[0]);
4959
4960 /* DWORK3 */
4961 ssSetDWorkWidth(childS, 3, 1);
4962 ssSetDWorkDataType(childS, 3,SS_INT8);
4963 ssSetDWorkComplexSignal(childS, 3, 0);
4964 ssSetDWorkUsedAsDState(childS, 3, 1);
4965 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 396))[0]);
4966 }
4967
4968 /* registration */
4969 LagFilter_sf(childS);
4970 sfcnInitializeSizes(childS);
4971 sfcnInitializeSampleTimes(childS);
4972
4973 /* adjust sample time */
4974 ssSetSampleTime(childS, 0, 0.0);
4975 ssSetOffsetTime(childS, 0, 0.0);
4976 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
4977
4978 /* set compiled values of dynamic vector attributes */
4979 ssSetNumNonsampledZCs(childS, 0);
4980
4981 /* Update connectivity flags for each port */
4982 _ssSetInputPortConnected(childS, 0, 1);
4983 _ssSetInputPortConnected(childS, 1, 1);
4984 _ssSetInputPortConnected(childS, 2, 1);
4985 _ssSetInputPortConnected(childS, 3, 1);
4986 _ssSetInputPortConnected(childS, 4, 1);
4987 _ssSetInputPortConnected(childS, 5, 1);
4988 _ssSetOutputPortConnected(childS, 0, 1);
4989 _ssSetOutputPortBeingMerged(childS, 0, 0);
4990
4991 /* Update the BufferDstPort flags for each input port */
4992 _ssSetInputPortBufferDstPort(childS, 0, -1);
4993 _ssSetInputPortBufferDstPort(childS, 1, -1);
4994 _ssSetInputPortBufferDstPort(childS, 2, -1);
4995 _ssSetInputPortBufferDstPort(childS, 3, -1);
4996 _ssSetInputPortBufferDstPort(childS, 4, -1);
4997 _ssSetInputPortBufferDstPort(childS, 5, -1);
4998
4999 /* Instance data for generated S-Function: LagFilter */
5000 {
5001 SimStruct *rts = childS;
5002
5003#include "LagFilter_sfcn_rtw/LagFilter_sid.h"
5004
5005 }
5006 }
5007
5008 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S86>/Generated S-Function6 (Res180_sf) */
5009 {
5010 SimStruct *childS = ssGetSFunction(rts, 27);
5011
5012 /* timing info */
5013 static time_T sfcnPeriod[1];
5014 static time_T sfcnOffset[1];
5015 static int_T sfcnTsMap[1];
5016 (void) memset((void*)sfcnPeriod, 0,
5017 sizeof(time_T)*1);
5018 (void) memset((void*)sfcnOffset, 0,
5019 sizeof(time_T)*1);
5020 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
5021 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
5022 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
5023
5024 /* Set up the mdlInfo pointer */
5025# ifdef USE_RTMODEL
5026
5027 {
5028 static struct _ssBlkInfo2 _blkInfo2;
5029 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
5030 ssSetBlkInfo2Ptr(childS, blkInfo2);
5031 }
5032
5033 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
5034
5035# else
5036
5037 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
5038
5039# endif /* USE_RTMODEL */
5040
5041 /* Allocate memory of model methods 2 */
5042 {
5043 static struct _ssSFcnModelMethods2 methods2;
5044 ssSetModelMethods2(childS, &methods2);
5045 }
5046
5047 /* Allocate memory of model methods 3 */
5048 {
5049 static struct _ssSFcnModelMethods3 methods3;
5050 ssSetModelMethods3(childS, &methods3);
5051 }
5052
5053 /* Allocate memory for states auxilliary information */
5054 {
5055 static struct _ssStatesInfo2 statesInfo2;
5056 static ssPeriodicStatesInfo periodicStatesInfo;
5057 ssSetStatesInfo2(childS, &statesInfo2);
5058 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
5059 }
5060
5061 /* inputs */
5062 {
5063 static struct _ssPortInputs inputPortInfo[1];
5064 _ssSetNumInputPorts(childS, 1);
5065 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
5066
5067 /* port 0 */
5068 {
5069 static real32_T const *sfcnUPtrs[1];
5070 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
5071 ssGetLocalBlockIO(rts))->Sum1_f;
5072 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
5073 _ssSetInputPortNumDimensions(childS, 0, 1);
5074 ssSetInputPortWidth(childS, 0, 1);
5075 }
5076 }
5077
5078 /* outputs */
5079 {
5080 static struct _ssPortOutputs outputPortInfo[1];
5081 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
5082 _ssSetNumOutputPorts(childS, 1);
5083
5084 /* port 0 */
5085 {
5086 _ssSetOutputPortNumDimensions(childS, 0, 1);
5087 ssSetOutputPortWidth(childS, 0, 1);
5088 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
5089 *) ssGetLocalBlockIO(rts))->GeneratedSFunction6));
5090 }
5091 }
5092
5093 /* path info */
5094 _ssSetModelName(childS, "Res180_sf");
5095 _ssSetPath(childS,
5096 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/appcLcontrol/ThetaLControl/Generated S-Function6");
5097 if (ssGetRTModel(rts) == (NULL)) {
5098 _ssSetParentSS(childS, rts);
5099 _ssSetRootSS(childS, ssGetRootSS(rts));
5100 } else {
5101 ssSetRTModel(childS,ssGetRTModel(rts));
5102 _ssSetParentSS(childS, (NULL));
5103 _ssSetRootSS(childS, childS);
5104 }
5105
5106 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
5107
5108 /* registration */
5109 Res180_sf(childS);
5110 sfcnInitializeSizes(childS);
5111 sfcnInitializeSampleTimes(childS);
5112
5113 /* adjust sample time */
5114 ssSetSampleTime(childS, 0, 0.0);
5115 ssSetOffsetTime(childS, 0, 0.0);
5116 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
5117
5118 /* set compiled values of dynamic vector attributes */
5119 ssSetNumNonsampledZCs(childS, 0);
5120
5121 /* Update connectivity flags for each port */
5122 _ssSetInputPortConnected(childS, 0, 1);
5123 _ssSetOutputPortConnected(childS, 0, 1);
5124 _ssSetOutputPortBeingMerged(childS, 0, 0);
5125
5126 /* Update the BufferDstPort flags for each input port */
5127 _ssSetInputPortBufferDstPort(childS, 0, -1);
5128
5129 /* Instance data for generated S-Function: Res180 */
5130 {
5131 SimStruct *rts = childS;
5132
5133#include "Res180_sfcn_rtw/Res180_sid.h"
5134
5135 }
5136 }
5137
5138 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S119>/Generated S-Function (SaturationLimiter_sf) */
5139 {
5140 SimStruct *childS = ssGetSFunction(rts, 28);
5141
5142 /* timing info */
5143 static time_T sfcnPeriod[1];
5144 static time_T sfcnOffset[1];
5145 static int_T sfcnTsMap[1];
5146 (void) memset((void*)sfcnPeriod, 0,
5147 sizeof(time_T)*1);
5148 (void) memset((void*)sfcnOffset, 0,
5149 sizeof(time_T)*1);
5150 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
5151 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
5152 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
5153
5154 /* Set up the mdlInfo pointer */
5155# ifdef USE_RTMODEL
5156
5157 {
5158 static struct _ssBlkInfo2 _blkInfo2;
5159 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
5160 ssSetBlkInfo2Ptr(childS, blkInfo2);
5161 }
5162
5163 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
5164
5165# else
5166
5167 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
5168
5169# endif /* USE_RTMODEL */
5170
5171 /* Allocate memory of model methods 2 */
5172 {
5173 static struct _ssSFcnModelMethods2 methods2;
5174 ssSetModelMethods2(childS, &methods2);
5175 }
5176
5177 /* Allocate memory of model methods 3 */
5178 {
5179 static struct _ssSFcnModelMethods3 methods3;
5180 ssSetModelMethods3(childS, &methods3);
5181 }
5182
5183 /* Allocate memory for states auxilliary information */
5184 {
5185 static struct _ssStatesInfo2 statesInfo2;
5186 static ssPeriodicStatesInfo periodicStatesInfo;
5187 ssSetStatesInfo2(childS, &statesInfo2);
5188 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
5189 }
5190
5191 /* inputs */
5192 {
5193 static struct _ssPortInputs inputPortInfo[3];
5194 _ssSetNumInputPorts(childS, 3);
5195 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
5196
5197 /* port 0 */
5198 {
5199 static real32_T const *sfcnUPtrs[1];
5200 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
5201 ssGetLocalBlockIO(rts))->GeneratedSFunction6;
5202 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
5203 _ssSetInputPortNumDimensions(childS, 0, 1);
5204 ssSetInputPortWidth(childS, 0, 1);
5205 }
5206
5207 /* port 1 */
5208 {
5209 static real32_T const *sfcnUPtrs[1];
5210 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled114;
5211 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
5212 _ssSetInputPortNumDimensions(childS, 1, 1);
5213 ssSetInputPortWidth(childS, 1, 1);
5214 }
5215
5216 /* port 2 */
5217 {
5218 static real32_T const *sfcnUPtrs[1];
5219 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled115;
5220 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
5221 _ssSetInputPortNumDimensions(childS, 2, 1);
5222 ssSetInputPortWidth(childS, 2, 1);
5223 }
5224 }
5225
5226 /* outputs */
5227 {
5228 static struct _ssPortOutputs outputPortInfo[1];
5229 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
5230 _ssSetNumOutputPorts(childS, 1);
5231
5232 /* port 0 */
5233 {
5234 _ssSetOutputPortNumDimensions(childS, 0, 1);
5235 ssSetOutputPortWidth(childS, 0, 1);
5236 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
5237 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_n0));
5238 }
5239 }
5240
5241 /* path info */
5242 _ssSetModelName(childS, "SaturationLimiter_sf");
5243 _ssSetPath(childS,
5244 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/appcLcontrol/ThetaLControl/Saturation Limiter/Generated S-Function");
5245 if (ssGetRTModel(rts) == (NULL)) {
5246 _ssSetParentSS(childS, rts);
5247 _ssSetRootSS(childS, ssGetRootSS(rts));
5248 } else {
5249 ssSetRTModel(childS,ssGetRTModel(rts));
5250 _ssSetParentSS(childS, (NULL));
5251 _ssSetRootSS(childS, childS);
5252 }
5253
5254 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
5255
5256 /* registration */
5257 SaturationLimiter_sf(childS);
5258 sfcnInitializeSizes(childS);
5259 sfcnInitializeSampleTimes(childS);
5260
5261 /* adjust sample time */
5262 ssSetSampleTime(childS, 0, 0.0);
5263 ssSetOffsetTime(childS, 0, 0.0);
5264 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
5265
5266 /* set compiled values of dynamic vector attributes */
5267 ssSetNumNonsampledZCs(childS, 0);
5268
5269 /* Update connectivity flags for each port */
5270 _ssSetInputPortConnected(childS, 0, 1);
5271 _ssSetInputPortConnected(childS, 1, 1);
5272 _ssSetInputPortConnected(childS, 2, 1);
5273 _ssSetOutputPortConnected(childS, 0, 1);
5274 _ssSetOutputPortBeingMerged(childS, 0, 0);
5275
5276 /* Update the BufferDstPort flags for each input port */
5277 _ssSetInputPortBufferDstPort(childS, 0, -1);
5278 _ssSetInputPortBufferDstPort(childS, 1, -1);
5279 _ssSetInputPortBufferDstPort(childS, 2, -1);
5280
5281 /* Instance data for generated S-Function: SaturationLimiter */
5282 {
5283 SimStruct *rts = childS;
5284
5285#include "SaturationLimiter_sfcn_rtw/SaturationLimiter_sid.h"
5286
5287 }
5288 }
5289
5290 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S121>/Generated S-Function (Gain_sf) */
5291 {
5292 SimStruct *childS = ssGetSFunction(rts, 29);
5293
5294 /* timing info */
5295 static time_T sfcnPeriod[1];
5296 static time_T sfcnOffset[1];
5297 static int_T sfcnTsMap[1];
5298 (void) memset((void*)sfcnPeriod, 0,
5299 sizeof(time_T)*1);
5300 (void) memset((void*)sfcnOffset, 0,
5301 sizeof(time_T)*1);
5302 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
5303 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
5304 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
5305
5306 /* Set up the mdlInfo pointer */
5307# ifdef USE_RTMODEL
5308
5309 {
5310 static struct _ssBlkInfo2 _blkInfo2;
5311 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
5312 ssSetBlkInfo2Ptr(childS, blkInfo2);
5313 }
5314
5315 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
5316
5317# else
5318
5319 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
5320
5321# endif /* USE_RTMODEL */
5322
5323 /* Allocate memory of model methods 2 */
5324 {
5325 static struct _ssSFcnModelMethods2 methods2;
5326 ssSetModelMethods2(childS, &methods2);
5327 }
5328
5329 /* Allocate memory of model methods 3 */
5330 {
5331 static struct _ssSFcnModelMethods3 methods3;
5332 ssSetModelMethods3(childS, &methods3);
5333 }
5334
5335 /* Allocate memory for states auxilliary information */
5336 {
5337 static struct _ssStatesInfo2 statesInfo2;
5338 static ssPeriodicStatesInfo periodicStatesInfo;
5339 ssSetStatesInfo2(childS, &statesInfo2);
5340 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
5341 }
5342
5343 /* inputs */
5344 {
5345 static struct _ssPortInputs inputPortInfo[2];
5346 _ssSetNumInputPorts(childS, 2);
5347 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
5348
5349 /* port 0 */
5350 {
5351 static real32_T const *sfcnUPtrs[1];
5352 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
5353 ssGetLocalBlockIO(rts))->GeneratedSFunction_n0;
5354 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
5355 _ssSetInputPortNumDimensions(childS, 0, 1);
5356 ssSetInputPortWidth(childS, 0, 1);
5357 }
5358
5359 /* port 1 */
5360 {
5361 static real32_T const *sfcnUPtrs[1];
5362 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled113;
5363 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
5364 _ssSetInputPortNumDimensions(childS, 1, 1);
5365 ssSetInputPortWidth(childS, 1, 1);
5366 }
5367 }
5368
5369 /* outputs */
5370 {
5371 static struct _ssPortOutputs outputPortInfo[1];
5372 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
5373 _ssSetNumOutputPorts(childS, 1);
5374
5375 /* port 0 */
5376 {
5377 _ssSetOutputPortNumDimensions(childS, 0, 1);
5378 ssSetOutputPortWidth(childS, 0, 1);
5379 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
5380 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_k1));
5381 }
5382 }
5383
5384 /* path info */
5385 _ssSetModelName(childS, "Gain_sf");
5386 _ssSetPath(childS,
5387 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/appcLcontrol/ThetaLControl/gain/Generated S-Function");
5388 if (ssGetRTModel(rts) == (NULL)) {
5389 _ssSetParentSS(childS, rts);
5390 _ssSetRootSS(childS, ssGetRootSS(rts));
5391 } else {
5392 ssSetRTModel(childS,ssGetRTModel(rts));
5393 _ssSetParentSS(childS, (NULL));
5394 _ssSetRootSS(childS, childS);
5395 }
5396
5397 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
5398
5399 /* registration */
5400 Gain_sf(childS);
5401 sfcnInitializeSizes(childS);
5402 sfcnInitializeSampleTimes(childS);
5403
5404 /* adjust sample time */
5405 ssSetSampleTime(childS, 0, 0.0);
5406 ssSetOffsetTime(childS, 0, 0.0);
5407 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
5408
5409 /* set compiled values of dynamic vector attributes */
5410 ssSetNumNonsampledZCs(childS, 0);
5411
5412 /* Update connectivity flags for each port */
5413 _ssSetInputPortConnected(childS, 0, 1);
5414 _ssSetInputPortConnected(childS, 1, 1);
5415 _ssSetOutputPortConnected(childS, 0, 1);
5416 _ssSetOutputPortBeingMerged(childS, 0, 0);
5417
5418 /* Update the BufferDstPort flags for each input port */
5419 _ssSetInputPortBufferDstPort(childS, 0, -1);
5420 _ssSetInputPortBufferDstPort(childS, 1, -1);
5421
5422 /* Instance data for generated S-Function: Gain */
5423 {
5424 SimStruct *rts = childS;
5425
5426#include "Gain_sfcn_rtw/Gain_sid.h"
5427
5428 }
5429 }
5430
5431 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S118>/Generated S-Function2 (LeadLagFilter_sf) */
5432 {
5433 SimStruct *childS = ssGetSFunction(rts, 30);
5434
5435 /* timing info */
5436 static time_T sfcnPeriod[1];
5437 static time_T sfcnOffset[1];
5438 static int_T sfcnTsMap[1];
5439 (void) memset((void*)sfcnPeriod, 0,
5440 sizeof(time_T)*1);
5441 (void) memset((void*)sfcnOffset, 0,
5442 sizeof(time_T)*1);
5443 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
5444 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
5445 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
5446
5447 /* Set up the mdlInfo pointer */
5448# ifdef USE_RTMODEL
5449
5450 {
5451 static struct _ssBlkInfo2 _blkInfo2;
5452 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
5453 ssSetBlkInfo2Ptr(childS, blkInfo2);
5454 }
5455
5456 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
5457
5458# else
5459
5460 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
5461
5462# endif /* USE_RTMODEL */
5463
5464 /* Allocate memory of model methods 2 */
5465 {
5466 static struct _ssSFcnModelMethods2 methods2;
5467 ssSetModelMethods2(childS, &methods2);
5468 }
5469
5470 /* Allocate memory of model methods 3 */
5471 {
5472 static struct _ssSFcnModelMethods3 methods3;
5473 ssSetModelMethods3(childS, &methods3);
5474 }
5475
5476 /* Allocate memory for states auxilliary information */
5477 {
5478 static struct _ssStatesInfo2 statesInfo2;
5479 static ssPeriodicStatesInfo periodicStatesInfo;
5480 ssSetStatesInfo2(childS, &statesInfo2);
5481 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
5482 }
5483
5484 /* inputs */
5485 {
5486 static struct _ssPortInputs inputPortInfo[7];
5487 _ssSetNumInputPorts(childS, 7);
5488 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
5489
5490 /* port 0 */
5491 {
5492 static real32_T const *sfcnUPtrs[1];
5493 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
5494 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReuseS;
5495 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
5496 _ssSetInputPortNumDimensions(childS, 0, 1);
5497 ssSetInputPortWidth(childS, 0, 1);
5498 }
5499
5500 /* port 1 */
5501 {
5502 static int8_T const *sfcnUPtrs[1];
5503 sfcnUPtrs[0] = (int8_T const *) &((B_AFCS_MODEL1_T *)
5504 ssGetLocalBlockIO(rts))->DataTypeConversion1_p;
5505 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
5506 _ssSetInputPortNumDimensions(childS, 1, 1);
5507 ssSetInputPortWidth(childS, 1, 1);
5508 }
5509
5510 /* port 2 */
5511 {
5512 static real32_T const *sfcnUPtrs[1];
5513 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled105;
5514 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
5515 _ssSetInputPortNumDimensions(childS, 2, 1);
5516 ssSetInputPortWidth(childS, 2, 1);
5517 }
5518
5519 /* port 3 */
5520 {
5521 static real32_T const *sfcnUPtrs[1];
5522 sfcnUPtrs[0] = (real32_T const *)
5523 &AFCS_MODEL1_ConstP.Constant10_Value_a;
5524 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
5525 _ssSetInputPortNumDimensions(childS, 3, 1);
5526 ssSetInputPortWidth(childS, 3, 1);
5527 }
5528
5529 /* port 4 */
5530 {
5531 static real32_T const *sfcnUPtrs[1];
5532 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
5533 ssGetLocalBlockIO(rts))->Switch_aj;
5534 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
5535 _ssSetInputPortNumDimensions(childS, 4, 1);
5536 ssSetInputPortWidth(childS, 4, 1);
5537 }
5538
5539 /* port 5 */
5540 {
5541 static real32_T const *sfcnUPtrs[1];
5542 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
5543 ssGetLocalBlockIO(rts))->Switch_aj;
5544 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
5545 _ssSetInputPortNumDimensions(childS, 5, 1);
5546 ssSetInputPortWidth(childS, 5, 1);
5547 }
5548
5549 /* port 6 */
5550 {
5551 static real32_T const *sfcnUPtrs[1];
5552 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
5553 ssGetLocalBlockIO(rts))->GeneratedSFunction_k1;
5554 _ssSetInputPortSignalPtrs(childS, 6, (InputPtrsType)&sfcnUPtrs[0]);
5555 _ssSetInputPortNumDimensions(childS, 6, 1);
5556 ssSetInputPortWidth(childS, 6, 1);
5557 }
5558 }
5559
5560 /* outputs */
5561 {
5562 static struct _ssPortOutputs outputPortInfo[1];
5563 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
5564 _ssSetNumOutputPorts(childS, 1);
5565
5566 /* port 0 */
5567 {
5568 _ssSetOutputPortNumDimensions(childS, 0, 1);
5569 ssSetOutputPortWidth(childS, 0, 1);
5570 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
5571 *) ssGetLocalBlockIO(rts))->GeneratedSFunction2_m));
5572 }
5573 }
5574
5575 /* path info */
5576 _ssSetModelName(childS, "LeadLagFilter_sf");
5577 _ssSetPath(childS,
5578 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/appcLcontrol/ThetaLControl/Lead lag/Generated S-Function2");
5579 if (ssGetRTModel(rts) == (NULL)) {
5580 _ssSetParentSS(childS, rts);
5581 _ssSetRootSS(childS, ssGetRootSS(rts));
5582 } else {
5583 ssSetRTModel(childS,ssGetRTModel(rts));
5584 _ssSetParentSS(childS, (NULL));
5585 _ssSetRootSS(childS, childS);
5586 }
5587
5588 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
5589
5590 /* work vectors */
5591 {
5592 static struct _ssDWorkRecord dWorkRecord[4];
5593 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
5594 ssSetSFcnDWork(childS, dWorkRecord);
5595 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
5596 _ssSetNumDWork(childS, 4);
5597
5598 /* DWORK0 */
5599 ssSetDWorkWidth(childS, 0, 1);
5600 ssSetDWorkDataType(childS, 0,SS_SINGLE);
5601 ssSetDWorkComplexSignal(childS, 0, 0);
5602 ssSetDWorkUsedAsDState(childS, 0, 1);
5603 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 170))[0]);
5604
5605 /* DWORK1 */
5606 ssSetDWorkWidth(childS, 1, 1);
5607 ssSetDWorkDataType(childS, 1,SS_SINGLE);
5608 ssSetDWorkComplexSignal(childS, 1, 0);
5609 ssSetDWorkUsedAsDState(childS, 1, 1);
5610 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 171))[0]);
5611
5612 /* DWORK2 */
5613 ssSetDWorkWidth(childS, 2, 1);
5614 ssSetDWorkDataType(childS, 2,SS_INT8);
5615 ssSetDWorkComplexSignal(childS, 2, 0);
5616 ssSetDWorkUsedAsDState(childS, 2, 1);
5617 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 397))[0]);
5618
5619 /* DWORK3 */
5620 ssSetDWorkWidth(childS, 3, 1);
5621 ssSetDWorkDataType(childS, 3,SS_INT8);
5622 ssSetDWorkComplexSignal(childS, 3, 0);
5623 ssSetDWorkUsedAsDState(childS, 3, 1);
5624 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 398))[0]);
5625 }
5626
5627 /* registration */
5628 LeadLagFilter_sf(childS);
5629 sfcnInitializeSizes(childS);
5630 sfcnInitializeSampleTimes(childS);
5631
5632 /* adjust sample time */
5633 ssSetSampleTime(childS, 0, 0.0);
5634 ssSetOffsetTime(childS, 0, 0.0);
5635 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
5636
5637 /* set compiled values of dynamic vector attributes */
5638 ssSetNumNonsampledZCs(childS, 0);
5639
5640 /* Update connectivity flags for each port */
5641 _ssSetInputPortConnected(childS, 0, 1);
5642 _ssSetInputPortConnected(childS, 1, 1);
5643 _ssSetInputPortConnected(childS, 2, 1);
5644 _ssSetInputPortConnected(childS, 3, 1);
5645 _ssSetInputPortConnected(childS, 4, 1);
5646 _ssSetInputPortConnected(childS, 5, 1);
5647 _ssSetInputPortConnected(childS, 6, 1);
5648 _ssSetOutputPortConnected(childS, 0, 1);
5649 _ssSetOutputPortBeingMerged(childS, 0, 0);
5650
5651 /* Update the BufferDstPort flags for each input port */
5652 _ssSetInputPortBufferDstPort(childS, 0, -1);
5653 _ssSetInputPortBufferDstPort(childS, 1, -1);
5654 _ssSetInputPortBufferDstPort(childS, 2, -1);
5655 _ssSetInputPortBufferDstPort(childS, 3, -1);
5656 _ssSetInputPortBufferDstPort(childS, 4, -1);
5657 _ssSetInputPortBufferDstPort(childS, 5, -1);
5658 _ssSetInputPortBufferDstPort(childS, 6, -1);
5659
5660 /* Instance data for generated S-Function: LeadLagFilter */
5661 {
5662 SimStruct *rts = childS;
5663
5664#include "LeadLagFilter_sfcn_rtw/LeadLagFilter_sid.h"
5665
5666 }
5667 }
5668
5669 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S120>/Generated S-Function1 (SaturationLimiter_sf) */
5670 {
5671 SimStruct *childS = ssGetSFunction(rts, 31);
5672
5673 /* timing info */
5674 static time_T sfcnPeriod[1];
5675 static time_T sfcnOffset[1];
5676 static int_T sfcnTsMap[1];
5677 (void) memset((void*)sfcnPeriod, 0,
5678 sizeof(time_T)*1);
5679 (void) memset((void*)sfcnOffset, 0,
5680 sizeof(time_T)*1);
5681 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
5682 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
5683 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
5684
5685 /* Set up the mdlInfo pointer */
5686# ifdef USE_RTMODEL
5687
5688 {
5689 static struct _ssBlkInfo2 _blkInfo2;
5690 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
5691 ssSetBlkInfo2Ptr(childS, blkInfo2);
5692 }
5693
5694 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
5695
5696# else
5697
5698 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
5699
5700# endif /* USE_RTMODEL */
5701
5702 /* Allocate memory of model methods 2 */
5703 {
5704 static struct _ssSFcnModelMethods2 methods2;
5705 ssSetModelMethods2(childS, &methods2);
5706 }
5707
5708 /* Allocate memory of model methods 3 */
5709 {
5710 static struct _ssSFcnModelMethods3 methods3;
5711 ssSetModelMethods3(childS, &methods3);
5712 }
5713
5714 /* Allocate memory for states auxilliary information */
5715 {
5716 static struct _ssStatesInfo2 statesInfo2;
5717 static ssPeriodicStatesInfo periodicStatesInfo;
5718 ssSetStatesInfo2(childS, &statesInfo2);
5719 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
5720 }
5721
5722 /* inputs */
5723 {
5724 static struct _ssPortInputs inputPortInfo[3];
5725 _ssSetNumInputPorts(childS, 3);
5726 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
5727
5728 /* port 0 */
5729 {
5730 static real32_T const *sfcnUPtrs[1];
5731 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
5732 ssGetLocalBlockIO(rts))->GeneratedSFunction2_m;
5733 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
5734 _ssSetInputPortNumDimensions(childS, 0, 1);
5735 ssSetInputPortWidth(childS, 0, 1);
5736 }
5737
5738 /* port 1 */
5739 {
5740 static real32_T const *sfcnUPtrs[1];
5741 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
5742 ssGetLocalBlockIO(rts))->Product1_m;
5743 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
5744 _ssSetInputPortNumDimensions(childS, 1, 1);
5745 ssSetInputPortWidth(childS, 1, 1);
5746 }
5747
5748 /* port 2 */
5749 {
5750 static real32_T const *sfcnUPtrs[1];
5751 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
5752 ssGetLocalBlockIO(rts))->Product_pp;
5753 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
5754 _ssSetInputPortNumDimensions(childS, 2, 1);
5755 ssSetInputPortWidth(childS, 2, 1);
5756 }
5757 }
5758
5759 /* outputs */
5760 {
5761 static struct _ssPortOutputs outputPortInfo[1];
5762 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
5763 _ssSetNumOutputPorts(childS, 1);
5764
5765 /* port 0 */
5766 {
5767 _ssSetOutputPortNumDimensions(childS, 0, 1);
5768 ssSetOutputPortWidth(childS, 0, 1);
5769 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
5770 *) ssGetLocalBlockIO(rts))->Saturation8));
5771 }
5772 }
5773
5774 /* path info */
5775 _ssSetModelName(childS, "SaturationLimiter_sf");
5776 _ssSetPath(childS,
5777 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/appcLcontrol/ThetaLControl/Saturation Limiter1/Generated S-Function1");
5778 if (ssGetRTModel(rts) == (NULL)) {
5779 _ssSetParentSS(childS, rts);
5780 _ssSetRootSS(childS, ssGetRootSS(rts));
5781 } else {
5782 ssSetRTModel(childS,ssGetRTModel(rts));
5783 _ssSetParentSS(childS, (NULL));
5784 _ssSetRootSS(childS, childS);
5785 }
5786
5787 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
5788
5789 /* registration */
5790 SaturationLimiter_sf(childS);
5791 sfcnInitializeSizes(childS);
5792 sfcnInitializeSampleTimes(childS);
5793
5794 /* adjust sample time */
5795 ssSetSampleTime(childS, 0, 0.0);
5796 ssSetOffsetTime(childS, 0, 0.0);
5797 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
5798
5799 /* set compiled values of dynamic vector attributes */
5800 ssSetNumNonsampledZCs(childS, 0);
5801
5802 /* Update connectivity flags for each port */
5803 _ssSetInputPortConnected(childS, 0, 1);
5804 _ssSetInputPortConnected(childS, 1, 1);
5805 _ssSetInputPortConnected(childS, 2, 1);
5806 _ssSetOutputPortConnected(childS, 0, 1);
5807 _ssSetOutputPortBeingMerged(childS, 0, 0);
5808
5809 /* Update the BufferDstPort flags for each input port */
5810 _ssSetInputPortBufferDstPort(childS, 0, -1);
5811 _ssSetInputPortBufferDstPort(childS, 1, -1);
5812 _ssSetInputPortBufferDstPort(childS, 2, -1);
5813
5814 /* Instance data for generated S-Function: SaturationLimiter */
5815 {
5816 SimStruct *rts = childS;
5817
5818#include "SaturationLimiter_sfcn_rtw/SaturationLimiter_sid.h"
5819
5820 }
5821 }
5822
5823 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S117>/Generated S-Function4 (LagFilter_sf) */
5824 {
5825 SimStruct *childS = ssGetSFunction(rts, 32);
5826
5827 /* timing info */
5828 static time_T sfcnPeriod[1];
5829 static time_T sfcnOffset[1];
5830 static int_T sfcnTsMap[1];
5831 (void) memset((void*)sfcnPeriod, 0,
5832 sizeof(time_T)*1);
5833 (void) memset((void*)sfcnOffset, 0,
5834 sizeof(time_T)*1);
5835 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
5836 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
5837 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
5838
5839 /* Set up the mdlInfo pointer */
5840# ifdef USE_RTMODEL
5841
5842 {
5843 static struct _ssBlkInfo2 _blkInfo2;
5844 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
5845 ssSetBlkInfo2Ptr(childS, blkInfo2);
5846 }
5847
5848 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
5849
5850# else
5851
5852 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
5853
5854# endif /* USE_RTMODEL */
5855
5856 /* Allocate memory of model methods 2 */
5857 {
5858 static struct _ssSFcnModelMethods2 methods2;
5859 ssSetModelMethods2(childS, &methods2);
5860 }
5861
5862 /* Allocate memory of model methods 3 */
5863 {
5864 static struct _ssSFcnModelMethods3 methods3;
5865 ssSetModelMethods3(childS, &methods3);
5866 }
5867
5868 /* Allocate memory for states auxilliary information */
5869 {
5870 static struct _ssStatesInfo2 statesInfo2;
5871 static ssPeriodicStatesInfo periodicStatesInfo;
5872 ssSetStatesInfo2(childS, &statesInfo2);
5873 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
5874 }
5875
5876 /* inputs */
5877 {
5878 static struct _ssPortInputs inputPortInfo[6];
5879 _ssSetNumInputPorts(childS, 6);
5880 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
5881
5882 /* port 0 */
5883 {
5884 static real32_T const *sfcnUPtrs[1];
5885 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
5886 ssGetLocalBlockIO(rts))->dtCAS;
5887 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
5888 _ssSetInputPortNumDimensions(childS, 0, 1);
5889 ssSetInputPortWidth(childS, 0, 1);
5890 }
5891
5892 /* port 1 */
5893 {
5894 static int8_T const *sfcnUPtrs[1];
5895 sfcnUPtrs[0] = (int8_T const *) &((B_AFCS_MODEL1_T *)
5896 ssGetLocalBlockIO(rts))->DataTypeConversion1_p;
5897 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
5898 _ssSetInputPortNumDimensions(childS, 1, 1);
5899 ssSetInputPortWidth(childS, 1, 1);
5900 }
5901
5902 /* port 2 */
5903 {
5904 static real32_T const *sfcnUPtrs[1];
5905 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled114;
5906 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
5907 _ssSetInputPortNumDimensions(childS, 2, 1);
5908 ssSetInputPortWidth(childS, 2, 1);
5909 }
5910
5911 /* port 3 */
5912 {
5913 static real32_T const *sfcnUPtrs[1];
5914 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
5915 ssGetLocalBlockIO(rts))->Sum1_e;
5916 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
5917 _ssSetInputPortNumDimensions(childS, 3, 1);
5918 ssSetInputPortWidth(childS, 3, 1);
5919 }
5920
5921 /* port 4 */
5922 {
5923 static real32_T const *sfcnUPtrs[1];
5924 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
5925 ssGetLocalBlockIO(rts))->Sum1_e;
5926 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
5927 _ssSetInputPortNumDimensions(childS, 4, 1);
5928 ssSetInputPortWidth(childS, 4, 1);
5929 }
5930
5931 /* port 5 */
5932 {
5933 static real32_T const *sfcnUPtrs[1];
5934 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
5935 ssGetLocalBlockIO(rts))->Sum2_eb;
5936 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
5937 _ssSetInputPortNumDimensions(childS, 5, 1);
5938 ssSetInputPortWidth(childS, 5, 1);
5939 }
5940 }
5941
5942 /* outputs */
5943 {
5944 static struct _ssPortOutputs outputPortInfo[1];
5945 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
5946 _ssSetNumOutputPorts(childS, 1);
5947
5948 /* port 0 */
5949 {
5950 _ssSetOutputPortNumDimensions(childS, 0, 1);
5951 ssSetOutputPortWidth(childS, 0, 1);
5952 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
5953 *) ssGetLocalBlockIO(rts))->GeneratedSFunction4_d));
5954 }
5955 }
5956
5957 /* path info */
5958 _ssSetModelName(childS, "LagFilter_sf");
5959 _ssSetPath(childS,
5960 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/appcLcontrol/ThetaLControl/ lag filter1/Generated S-Function4");
5961 if (ssGetRTModel(rts) == (NULL)) {
5962 _ssSetParentSS(childS, rts);
5963 _ssSetRootSS(childS, ssGetRootSS(rts));
5964 } else {
5965 ssSetRTModel(childS,ssGetRTModel(rts));
5966 _ssSetParentSS(childS, (NULL));
5967 _ssSetRootSS(childS, childS);
5968 }
5969
5970 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
5971
5972 /* work vectors */
5973 {
5974 static struct _ssDWorkRecord dWorkRecord[4];
5975 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
5976 ssSetSFcnDWork(childS, dWorkRecord);
5977 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
5978 _ssSetNumDWork(childS, 4);
5979
5980 /* DWORK0 */
5981 ssSetDWorkWidth(childS, 0, 1);
5982 ssSetDWorkDataType(childS, 0,SS_SINGLE);
5983 ssSetDWorkComplexSignal(childS, 0, 0);
5984 ssSetDWorkUsedAsDState(childS, 0, 1);
5985 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 172))[0]);
5986
5987 /* DWORK1 */
5988 ssSetDWorkWidth(childS, 1, 1);
5989 ssSetDWorkDataType(childS, 1,SS_SINGLE);
5990 ssSetDWorkComplexSignal(childS, 1, 0);
5991 ssSetDWorkUsedAsDState(childS, 1, 1);
5992 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 173))[0]);
5993
5994 /* DWORK2 */
5995 ssSetDWorkWidth(childS, 2, 1);
5996 ssSetDWorkDataType(childS, 2,SS_INT8);
5997 ssSetDWorkComplexSignal(childS, 2, 0);
5998 ssSetDWorkUsedAsDState(childS, 2, 1);
5999 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 399))[0]);
6000
6001 /* DWORK3 */
6002 ssSetDWorkWidth(childS, 3, 1);
6003 ssSetDWorkDataType(childS, 3,SS_INT8);
6004 ssSetDWorkComplexSignal(childS, 3, 0);
6005 ssSetDWorkUsedAsDState(childS, 3, 1);
6006 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 400))[0]);
6007 }
6008
6009 /* registration */
6010 LagFilter_sf(childS);
6011 sfcnInitializeSizes(childS);
6012 sfcnInitializeSampleTimes(childS);
6013
6014 /* adjust sample time */
6015 ssSetSampleTime(childS, 0, 0.0);
6016 ssSetOffsetTime(childS, 0, 0.0);
6017 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
6018
6019 /* set compiled values of dynamic vector attributes */
6020 ssSetNumNonsampledZCs(childS, 0);
6021
6022 /* Update connectivity flags for each port */
6023 _ssSetInputPortConnected(childS, 0, 1);
6024 _ssSetInputPortConnected(childS, 1, 1);
6025 _ssSetInputPortConnected(childS, 2, 1);
6026 _ssSetInputPortConnected(childS, 3, 1);
6027 _ssSetInputPortConnected(childS, 4, 1);
6028 _ssSetInputPortConnected(childS, 5, 1);
6029 _ssSetOutputPortConnected(childS, 0, 1);
6030 _ssSetOutputPortBeingMerged(childS, 0, 0);
6031
6032 /* Update the BufferDstPort flags for each input port */
6033 _ssSetInputPortBufferDstPort(childS, 0, -1);
6034 _ssSetInputPortBufferDstPort(childS, 1, -1);
6035 _ssSetInputPortBufferDstPort(childS, 2, -1);
6036 _ssSetInputPortBufferDstPort(childS, 3, -1);
6037 _ssSetInputPortBufferDstPort(childS, 4, -1);
6038 _ssSetInputPortBufferDstPort(childS, 5, -1);
6039
6040 /* Instance data for generated S-Function: LagFilter */
6041 {
6042 SimStruct *rts = childS;
6043
6044#include "LagFilter_sfcn_rtw/LagFilter_sid.h"
6045
6046 }
6047 }
6048
6049 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S122>/Generated S-Function (Gain_sf) */
6050 {
6051 SimStruct *childS = ssGetSFunction(rts, 33);
6052
6053 /* timing info */
6054 static time_T sfcnPeriod[1];
6055 static time_T sfcnOffset[1];
6056 static int_T sfcnTsMap[1];
6057 (void) memset((void*)sfcnPeriod, 0,
6058 sizeof(time_T)*1);
6059 (void) memset((void*)sfcnOffset, 0,
6060 sizeof(time_T)*1);
6061 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
6062 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
6063 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
6064
6065 /* Set up the mdlInfo pointer */
6066# ifdef USE_RTMODEL
6067
6068 {
6069 static struct _ssBlkInfo2 _blkInfo2;
6070 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
6071 ssSetBlkInfo2Ptr(childS, blkInfo2);
6072 }
6073
6074 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
6075
6076# else
6077
6078 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
6079
6080# endif /* USE_RTMODEL */
6081
6082 /* Allocate memory of model methods 2 */
6083 {
6084 static struct _ssSFcnModelMethods2 methods2;
6085 ssSetModelMethods2(childS, &methods2);
6086 }
6087
6088 /* Allocate memory of model methods 3 */
6089 {
6090 static struct _ssSFcnModelMethods3 methods3;
6091 ssSetModelMethods3(childS, &methods3);
6092 }
6093
6094 /* Allocate memory for states auxilliary information */
6095 {
6096 static struct _ssStatesInfo2 statesInfo2;
6097 static ssPeriodicStatesInfo periodicStatesInfo;
6098 ssSetStatesInfo2(childS, &statesInfo2);
6099 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
6100 }
6101
6102 /* inputs */
6103 {
6104 static struct _ssPortInputs inputPortInfo[2];
6105 _ssSetNumInputPorts(childS, 2);
6106 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
6107
6108 /* port 0 */
6109 {
6110 static real32_T const *sfcnUPtrs[1];
6111 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
6112 ssGetLocalBlockIO(rts))->GeneratedSFunction4_d;
6113 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
6114 _ssSetInputPortNumDimensions(childS, 0, 1);
6115 ssSetInputPortWidth(childS, 0, 1);
6116 }
6117
6118 /* port 1 */
6119 {
6120 static real32_T const *sfcnUPtrs[1];
6121 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled105;
6122 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
6123 _ssSetInputPortNumDimensions(childS, 1, 1);
6124 ssSetInputPortWidth(childS, 1, 1);
6125 }
6126 }
6127
6128 /* outputs */
6129 {
6130 static struct _ssPortOutputs outputPortInfo[1];
6131 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
6132 _ssSetNumOutputPorts(childS, 1);
6133
6134 /* port 0 */
6135 {
6136 _ssSetOutputPortNumDimensions(childS, 0, 1);
6137 ssSetOutputPortWidth(childS, 0, 1);
6138 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
6139 *) ssGetLocalBlockIO(rts))->Switch6_d));
6140 }
6141 }
6142
6143 /* path info */
6144 _ssSetModelName(childS, "Gain_sf");
6145 _ssSetPath(childS,
6146 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/appcLcontrol/ThetaLControl/gain1/Generated S-Function");
6147 if (ssGetRTModel(rts) == (NULL)) {
6148 _ssSetParentSS(childS, rts);
6149 _ssSetRootSS(childS, ssGetRootSS(rts));
6150 } else {
6151 ssSetRTModel(childS,ssGetRTModel(rts));
6152 _ssSetParentSS(childS, (NULL));
6153 _ssSetRootSS(childS, childS);
6154 }
6155
6156 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
6157
6158 /* registration */
6159 Gain_sf(childS);
6160 sfcnInitializeSizes(childS);
6161 sfcnInitializeSampleTimes(childS);
6162
6163 /* adjust sample time */
6164 ssSetSampleTime(childS, 0, 0.0);
6165 ssSetOffsetTime(childS, 0, 0.0);
6166 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
6167
6168 /* set compiled values of dynamic vector attributes */
6169 ssSetNumNonsampledZCs(childS, 0);
6170
6171 /* Update connectivity flags for each port */
6172 _ssSetInputPortConnected(childS, 0, 1);
6173 _ssSetInputPortConnected(childS, 1, 1);
6174 _ssSetOutputPortConnected(childS, 0, 1);
6175 _ssSetOutputPortBeingMerged(childS, 0, 0);
6176
6177 /* Update the BufferDstPort flags for each input port */
6178 _ssSetInputPortBufferDstPort(childS, 0, -1);
6179 _ssSetInputPortBufferDstPort(childS, 1, -1);
6180
6181 /* Instance data for generated S-Function: Gain */
6182 {
6183 SimStruct *rts = childS;
6184
6185#include "Gain_sfcn_rtw/Gain_sid.h"
6186
6187 }
6188 }
6189
6190 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S116>/Generated S-Function4 (LagFilter_sf) */
6191 {
6192 SimStruct *childS = ssGetSFunction(rts, 34);
6193
6194 /* timing info */
6195 static time_T sfcnPeriod[1];
6196 static time_T sfcnOffset[1];
6197 static int_T sfcnTsMap[1];
6198 (void) memset((void*)sfcnPeriod, 0,
6199 sizeof(time_T)*1);
6200 (void) memset((void*)sfcnOffset, 0,
6201 sizeof(time_T)*1);
6202 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
6203 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
6204 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
6205
6206 /* Set up the mdlInfo pointer */
6207# ifdef USE_RTMODEL
6208
6209 {
6210 static struct _ssBlkInfo2 _blkInfo2;
6211 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
6212 ssSetBlkInfo2Ptr(childS, blkInfo2);
6213 }
6214
6215 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
6216
6217# else
6218
6219 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
6220
6221# endif /* USE_RTMODEL */
6222
6223 /* Allocate memory of model methods 2 */
6224 {
6225 static struct _ssSFcnModelMethods2 methods2;
6226 ssSetModelMethods2(childS, &methods2);
6227 }
6228
6229 /* Allocate memory of model methods 3 */
6230 {
6231 static struct _ssSFcnModelMethods3 methods3;
6232 ssSetModelMethods3(childS, &methods3);
6233 }
6234
6235 /* Allocate memory for states auxilliary information */
6236 {
6237 static struct _ssStatesInfo2 statesInfo2;
6238 static ssPeriodicStatesInfo periodicStatesInfo;
6239 ssSetStatesInfo2(childS, &statesInfo2);
6240 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
6241 }
6242
6243 /* inputs */
6244 {
6245 static struct _ssPortInputs inputPortInfo[6];
6246 _ssSetNumInputPorts(childS, 6);
6247 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
6248
6249 /* port 0 */
6250 {
6251 static real32_T const *sfcnUPtrs[1];
6252 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
6253 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReuseS;
6254 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
6255 _ssSetInputPortNumDimensions(childS, 0, 1);
6256 ssSetInputPortWidth(childS, 0, 1);
6257 }
6258
6259 /* port 1 */
6260 {
6261 static int8_T const *sfcnUPtrs[1];
6262 sfcnUPtrs[0] = (int8_T const *) &((B_AFCS_MODEL1_T *)
6263 ssGetLocalBlockIO(rts))->DataTypeConversion1_p;
6264 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
6265 _ssSetInputPortNumDimensions(childS, 1, 1);
6266 ssSetInputPortWidth(childS, 1, 1);
6267 }
6268
6269 /* port 2 */
6270 {
6271 static real32_T const *sfcnUPtrs[1];
6272 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled107;
6273 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
6274 _ssSetInputPortNumDimensions(childS, 2, 1);
6275 ssSetInputPortWidth(childS, 2, 1);
6276 }
6277
6278 /* port 3 */
6279 {
6280 static real32_T const *sfcnUPtrs[1];
6281 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
6282 ssGetLocalBlockIO(rts))->Switch_aj;
6283 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
6284 _ssSetInputPortNumDimensions(childS, 3, 1);
6285 ssSetInputPortWidth(childS, 3, 1);
6286 }
6287
6288 /* port 4 */
6289 {
6290 static real32_T const *sfcnUPtrs[1];
6291 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
6292 ssGetLocalBlockIO(rts))->Switch_aj;
6293 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
6294 _ssSetInputPortNumDimensions(childS, 4, 1);
6295 ssSetInputPortWidth(childS, 4, 1);
6296 }
6297
6298 /* port 5 */
6299 {
6300 static real32_T const *sfcnUPtrs[1];
6301 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
6302 ssGetLocalBlockIO(rts))->Sum3_l;
6303 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
6304 _ssSetInputPortNumDimensions(childS, 5, 1);
6305 ssSetInputPortWidth(childS, 5, 1);
6306 }
6307 }
6308
6309 /* outputs */
6310 {
6311 static struct _ssPortOutputs outputPortInfo[1];
6312 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
6313 _ssSetNumOutputPorts(childS, 1);
6314
6315 /* port 0 */
6316 {
6317 _ssSetOutputPortNumDimensions(childS, 0, 1);
6318 ssSetOutputPortWidth(childS, 0, 1);
6319 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
6320 *) ssGetLocalBlockIO(rts))->GeneratedSFunction4_f));
6321 }
6322 }
6323
6324 /* path info */
6325 _ssSetModelName(childS, "LagFilter_sf");
6326 _ssSetPath(childS,
6327 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/appcLcontrol/ThetaLControl/ lag filter/Generated S-Function4");
6328 if (ssGetRTModel(rts) == (NULL)) {
6329 _ssSetParentSS(childS, rts);
6330 _ssSetRootSS(childS, ssGetRootSS(rts));
6331 } else {
6332 ssSetRTModel(childS,ssGetRTModel(rts));
6333 _ssSetParentSS(childS, (NULL));
6334 _ssSetRootSS(childS, childS);
6335 }
6336
6337 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
6338
6339 /* work vectors */
6340 {
6341 static struct _ssDWorkRecord dWorkRecord[4];
6342 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
6343 ssSetSFcnDWork(childS, dWorkRecord);
6344 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
6345 _ssSetNumDWork(childS, 4);
6346
6347 /* DWORK0 */
6348 ssSetDWorkWidth(childS, 0, 1);
6349 ssSetDWorkDataType(childS, 0,SS_SINGLE);
6350 ssSetDWorkComplexSignal(childS, 0, 0);
6351 ssSetDWorkUsedAsDState(childS, 0, 1);
6352 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 174))[0]);
6353
6354 /* DWORK1 */
6355 ssSetDWorkWidth(childS, 1, 1);
6356 ssSetDWorkDataType(childS, 1,SS_SINGLE);
6357 ssSetDWorkComplexSignal(childS, 1, 0);
6358 ssSetDWorkUsedAsDState(childS, 1, 1);
6359 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 175))[0]);
6360
6361 /* DWORK2 */
6362 ssSetDWorkWidth(childS, 2, 1);
6363 ssSetDWorkDataType(childS, 2,SS_INT8);
6364 ssSetDWorkComplexSignal(childS, 2, 0);
6365 ssSetDWorkUsedAsDState(childS, 2, 1);
6366 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 401))[0]);
6367
6368 /* DWORK3 */
6369 ssSetDWorkWidth(childS, 3, 1);
6370 ssSetDWorkDataType(childS, 3,SS_INT8);
6371 ssSetDWorkComplexSignal(childS, 3, 0);
6372 ssSetDWorkUsedAsDState(childS, 3, 1);
6373 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 402))[0]);
6374 }
6375
6376 /* registration */
6377 LagFilter_sf(childS);
6378 sfcnInitializeSizes(childS);
6379 sfcnInitializeSampleTimes(childS);
6380
6381 /* adjust sample time */
6382 ssSetSampleTime(childS, 0, 0.0);
6383 ssSetOffsetTime(childS, 0, 0.0);
6384 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
6385
6386 /* set compiled values of dynamic vector attributes */
6387 ssSetNumNonsampledZCs(childS, 0);
6388
6389 /* Update connectivity flags for each port */
6390 _ssSetInputPortConnected(childS, 0, 1);
6391 _ssSetInputPortConnected(childS, 1, 1);
6392 _ssSetInputPortConnected(childS, 2, 1);
6393 _ssSetInputPortConnected(childS, 3, 1);
6394 _ssSetInputPortConnected(childS, 4, 1);
6395 _ssSetInputPortConnected(childS, 5, 1);
6396 _ssSetOutputPortConnected(childS, 0, 1);
6397 _ssSetOutputPortBeingMerged(childS, 0, 0);
6398
6399 /* Update the BufferDstPort flags for each input port */
6400 _ssSetInputPortBufferDstPort(childS, 0, -1);
6401 _ssSetInputPortBufferDstPort(childS, 1, -1);
6402 _ssSetInputPortBufferDstPort(childS, 2, -1);
6403 _ssSetInputPortBufferDstPort(childS, 3, -1);
6404 _ssSetInputPortBufferDstPort(childS, 4, -1);
6405 _ssSetInputPortBufferDstPort(childS, 5, -1);
6406
6407 /* Instance data for generated S-Function: LagFilter */
6408 {
6409 SimStruct *rts = childS;
6410
6411#include "LagFilter_sfcn_rtw/LagFilter_sid.h"
6412
6413 }
6414 }
6415
6416 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S102>/Generated S-Function1 (SaturationLimiter_sf) */
6417 {
6418 SimStruct *childS = ssGetSFunction(rts, 35);
6419
6420 /* timing info */
6421 static time_T sfcnPeriod[1];
6422 static time_T sfcnOffset[1];
6423 static int_T sfcnTsMap[1];
6424 (void) memset((void*)sfcnPeriod, 0,
6425 sizeof(time_T)*1);
6426 (void) memset((void*)sfcnOffset, 0,
6427 sizeof(time_T)*1);
6428 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
6429 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
6430 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
6431
6432 /* Set up the mdlInfo pointer */
6433# ifdef USE_RTMODEL
6434
6435 {
6436 static struct _ssBlkInfo2 _blkInfo2;
6437 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
6438 ssSetBlkInfo2Ptr(childS, blkInfo2);
6439 }
6440
6441 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
6442
6443# else
6444
6445 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
6446
6447# endif /* USE_RTMODEL */
6448
6449 /* Allocate memory of model methods 2 */
6450 {
6451 static struct _ssSFcnModelMethods2 methods2;
6452 ssSetModelMethods2(childS, &methods2);
6453 }
6454
6455 /* Allocate memory of model methods 3 */
6456 {
6457 static struct _ssSFcnModelMethods3 methods3;
6458 ssSetModelMethods3(childS, &methods3);
6459 }
6460
6461 /* Allocate memory for states auxilliary information */
6462 {
6463 static struct _ssStatesInfo2 statesInfo2;
6464 static ssPeriodicStatesInfo periodicStatesInfo;
6465 ssSetStatesInfo2(childS, &statesInfo2);
6466 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
6467 }
6468
6469 /* inputs */
6470 {
6471 static struct _ssPortInputs inputPortInfo[3];
6472 _ssSetNumInputPorts(childS, 3);
6473 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
6474
6475 /* port 0 */
6476 {
6477 static real32_T const *sfcnUPtrs[1];
6478 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
6479 ssGetLocalBlockIO(rts))->Sum1_l;
6480 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
6481 _ssSetInputPortNumDimensions(childS, 0, 1);
6482 ssSetInputPortWidth(childS, 0, 1);
6483 }
6484
6485 /* port 1 */
6486 {
6487 static real32_T const *sfcnUPtrs[1];
6488 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled111;
6489 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
6490 _ssSetInputPortNumDimensions(childS, 1, 1);
6491 ssSetInputPortWidth(childS, 1, 1);
6492 }
6493
6494 /* port 2 */
6495 {
6496 static real32_T const *sfcnUPtrs[1];
6497 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled112;
6498 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
6499 _ssSetInputPortNumDimensions(childS, 2, 1);
6500 ssSetInputPortWidth(childS, 2, 1);
6501 }
6502 }
6503
6504 /* outputs */
6505 {
6506 static struct _ssPortOutputs outputPortInfo[1];
6507 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
6508 _ssSetNumOutputPorts(childS, 1);
6509
6510 /* port 0 */
6511 {
6512 _ssSetOutputPortNumDimensions(childS, 0, 1);
6513 ssSetOutputPortWidth(childS, 0, 1);
6514 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
6515 *) ssGetLocalBlockIO(rts))->GeneratedSFunction1_n));
6516 }
6517 }
6518
6519 /* path info */
6520 _ssSetModelName(childS, "SaturationLimiter_sf");
6521 _ssSetPath(childS,
6522 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/appcLcontrol/GamaLControl/Saturation Limiter1/Generated S-Function1");
6523 if (ssGetRTModel(rts) == (NULL)) {
6524 _ssSetParentSS(childS, rts);
6525 _ssSetRootSS(childS, ssGetRootSS(rts));
6526 } else {
6527 ssSetRTModel(childS,ssGetRTModel(rts));
6528 _ssSetParentSS(childS, (NULL));
6529 _ssSetRootSS(childS, childS);
6530 }
6531
6532 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
6533
6534 /* registration */
6535 SaturationLimiter_sf(childS);
6536 sfcnInitializeSizes(childS);
6537 sfcnInitializeSampleTimes(childS);
6538
6539 /* adjust sample time */
6540 ssSetSampleTime(childS, 0, 0.0);
6541 ssSetOffsetTime(childS, 0, 0.0);
6542 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
6543
6544 /* set compiled values of dynamic vector attributes */
6545 ssSetNumNonsampledZCs(childS, 0);
6546
6547 /* Update connectivity flags for each port */
6548 _ssSetInputPortConnected(childS, 0, 1);
6549 _ssSetInputPortConnected(childS, 1, 1);
6550 _ssSetInputPortConnected(childS, 2, 1);
6551 _ssSetOutputPortConnected(childS, 0, 1);
6552 _ssSetOutputPortBeingMerged(childS, 0, 0);
6553
6554 /* Update the BufferDstPort flags for each input port */
6555 _ssSetInputPortBufferDstPort(childS, 0, -1);
6556 _ssSetInputPortBufferDstPort(childS, 1, -1);
6557 _ssSetInputPortBufferDstPort(childS, 2, -1);
6558
6559 /* Instance data for generated S-Function: SaturationLimiter */
6560 {
6561 SimStruct *rts = childS;
6562
6563#include "SaturationLimiter_sfcn_rtw/SaturationLimiter_sid.h"
6564
6565 }
6566 }
6567
6568 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S104>/Generated S-Function (Gain_sf) */
6569 {
6570 SimStruct *childS = ssGetSFunction(rts, 36);
6571
6572 /* timing info */
6573 static time_T sfcnPeriod[1];
6574 static time_T sfcnOffset[1];
6575 static int_T sfcnTsMap[1];
6576 (void) memset((void*)sfcnPeriod, 0,
6577 sizeof(time_T)*1);
6578 (void) memset((void*)sfcnOffset, 0,
6579 sizeof(time_T)*1);
6580 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
6581 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
6582 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
6583
6584 /* Set up the mdlInfo pointer */
6585# ifdef USE_RTMODEL
6586
6587 {
6588 static struct _ssBlkInfo2 _blkInfo2;
6589 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
6590 ssSetBlkInfo2Ptr(childS, blkInfo2);
6591 }
6592
6593 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
6594
6595# else
6596
6597 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
6598
6599# endif /* USE_RTMODEL */
6600
6601 /* Allocate memory of model methods 2 */
6602 {
6603 static struct _ssSFcnModelMethods2 methods2;
6604 ssSetModelMethods2(childS, &methods2);
6605 }
6606
6607 /* Allocate memory of model methods 3 */
6608 {
6609 static struct _ssSFcnModelMethods3 methods3;
6610 ssSetModelMethods3(childS, &methods3);
6611 }
6612
6613 /* Allocate memory for states auxilliary information */
6614 {
6615 static struct _ssStatesInfo2 statesInfo2;
6616 static ssPeriodicStatesInfo periodicStatesInfo;
6617 ssSetStatesInfo2(childS, &statesInfo2);
6618 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
6619 }
6620
6621 /* inputs */
6622 {
6623 static struct _ssPortInputs inputPortInfo[2];
6624 _ssSetNumInputPorts(childS, 2);
6625 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
6626
6627 /* port 0 */
6628 {
6629 static real32_T const *sfcnUPtrs[1];
6630 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
6631 ssGetLocalBlockIO(rts))->GeneratedSFunction1_n;
6632 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
6633 _ssSetInputPortNumDimensions(childS, 0, 1);
6634 ssSetInputPortWidth(childS, 0, 1);
6635 }
6636
6637 /* port 1 */
6638 {
6639 static real32_T const *sfcnUPtrs[1];
6640 sfcnUPtrs[0] = (real32_T const *)
6641 &AFCS_MODEL1_ConstP.Constant13_Value_n;
6642 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
6643 _ssSetInputPortNumDimensions(childS, 1, 1);
6644 ssSetInputPortWidth(childS, 1, 1);
6645 }
6646 }
6647
6648 /* outputs */
6649 {
6650 static struct _ssPortOutputs outputPortInfo[1];
6651 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
6652 _ssSetNumOutputPorts(childS, 1);
6653
6654 /* port 0 */
6655 {
6656 _ssSetOutputPortNumDimensions(childS, 0, 1);
6657 ssSetOutputPortWidth(childS, 0, 1);
6658 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
6659 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_b1));
6660 }
6661 }
6662
6663 /* path info */
6664 _ssSetModelName(childS, "Gain_sf");
6665 _ssSetPath(childS,
6666 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/appcLcontrol/GamaLControl/gain/Generated S-Function");
6667 if (ssGetRTModel(rts) == (NULL)) {
6668 _ssSetParentSS(childS, rts);
6669 _ssSetRootSS(childS, ssGetRootSS(rts));
6670 } else {
6671 ssSetRTModel(childS,ssGetRTModel(rts));
6672 _ssSetParentSS(childS, (NULL));
6673 _ssSetRootSS(childS, childS);
6674 }
6675
6676 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
6677
6678 /* registration */
6679 Gain_sf(childS);
6680 sfcnInitializeSizes(childS);
6681 sfcnInitializeSampleTimes(childS);
6682
6683 /* adjust sample time */
6684 ssSetSampleTime(childS, 0, 0.0);
6685 ssSetOffsetTime(childS, 0, 0.0);
6686 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
6687
6688 /* set compiled values of dynamic vector attributes */
6689 ssSetNumNonsampledZCs(childS, 0);
6690
6691 /* Update connectivity flags for each port */
6692 _ssSetInputPortConnected(childS, 0, 1);
6693 _ssSetInputPortConnected(childS, 1, 1);
6694 _ssSetOutputPortConnected(childS, 0, 1);
6695 _ssSetOutputPortBeingMerged(childS, 0, 0);
6696
6697 /* Update the BufferDstPort flags for each input port */
6698 _ssSetInputPortBufferDstPort(childS, 0, -1);
6699 _ssSetInputPortBufferDstPort(childS, 1, -1);
6700
6701 /* Instance data for generated S-Function: Gain */
6702 {
6703 SimStruct *rts = childS;
6704
6705#include "Gain_sfcn_rtw/Gain_sid.h"
6706
6707 }
6708 }
6709
6710 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S105>/Generated S-Function (Gain_sf) */
6711 {
6712 SimStruct *childS = ssGetSFunction(rts, 37);
6713
6714 /* timing info */
6715 static time_T sfcnPeriod[1];
6716 static time_T sfcnOffset[1];
6717 static int_T sfcnTsMap[1];
6718 (void) memset((void*)sfcnPeriod, 0,
6719 sizeof(time_T)*1);
6720 (void) memset((void*)sfcnOffset, 0,
6721 sizeof(time_T)*1);
6722 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
6723 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
6724 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
6725
6726 /* Set up the mdlInfo pointer */
6727# ifdef USE_RTMODEL
6728
6729 {
6730 static struct _ssBlkInfo2 _blkInfo2;
6731 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
6732 ssSetBlkInfo2Ptr(childS, blkInfo2);
6733 }
6734
6735 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
6736
6737# else
6738
6739 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
6740
6741# endif /* USE_RTMODEL */
6742
6743 /* Allocate memory of model methods 2 */
6744 {
6745 static struct _ssSFcnModelMethods2 methods2;
6746 ssSetModelMethods2(childS, &methods2);
6747 }
6748
6749 /* Allocate memory of model methods 3 */
6750 {
6751 static struct _ssSFcnModelMethods3 methods3;
6752 ssSetModelMethods3(childS, &methods3);
6753 }
6754
6755 /* Allocate memory for states auxilliary information */
6756 {
6757 static struct _ssStatesInfo2 statesInfo2;
6758 static ssPeriodicStatesInfo periodicStatesInfo;
6759 ssSetStatesInfo2(childS, &statesInfo2);
6760 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
6761 }
6762
6763 /* inputs */
6764 {
6765 static struct _ssPortInputs inputPortInfo[2];
6766 _ssSetNumInputPorts(childS, 2);
6767 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
6768
6769 /* port 0 */
6770 {
6771 static real32_T const *sfcnUPtrs[1];
6772 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
6773 ssGetLocalBlockIO(rts))->GeneratedSFunction_b1;
6774 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
6775 _ssSetInputPortNumDimensions(childS, 0, 1);
6776 ssSetInputPortWidth(childS, 0, 1);
6777 }
6778
6779 /* port 1 */
6780 {
6781 static real32_T const *sfcnUPtrs[1];
6782 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled116;
6783 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
6784 _ssSetInputPortNumDimensions(childS, 1, 1);
6785 ssSetInputPortWidth(childS, 1, 1);
6786 }
6787 }
6788
6789 /* outputs */
6790 {
6791 static struct _ssPortOutputs outputPortInfo[1];
6792 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
6793 _ssSetNumOutputPorts(childS, 1);
6794
6795 /* port 0 */
6796 {
6797 _ssSetOutputPortNumDimensions(childS, 0, 1);
6798 ssSetOutputPortWidth(childS, 0, 1);
6799 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
6800 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_h));
6801 }
6802 }
6803
6804 /* path info */
6805 _ssSetModelName(childS, "Gain_sf");
6806 _ssSetPath(childS,
6807 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/appcLcontrol/GamaLControl/gain4/Generated S-Function");
6808 if (ssGetRTModel(rts) == (NULL)) {
6809 _ssSetParentSS(childS, rts);
6810 _ssSetRootSS(childS, ssGetRootSS(rts));
6811 } else {
6812 ssSetRTModel(childS,ssGetRTModel(rts));
6813 _ssSetParentSS(childS, (NULL));
6814 _ssSetRootSS(childS, childS);
6815 }
6816
6817 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
6818
6819 /* registration */
6820 Gain_sf(childS);
6821 sfcnInitializeSizes(childS);
6822 sfcnInitializeSampleTimes(childS);
6823
6824 /* adjust sample time */
6825 ssSetSampleTime(childS, 0, 0.0);
6826 ssSetOffsetTime(childS, 0, 0.0);
6827 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
6828
6829 /* set compiled values of dynamic vector attributes */
6830 ssSetNumNonsampledZCs(childS, 0);
6831
6832 /* Update connectivity flags for each port */
6833 _ssSetInputPortConnected(childS, 0, 1);
6834 _ssSetInputPortConnected(childS, 1, 1);
6835 _ssSetOutputPortConnected(childS, 0, 1);
6836 _ssSetOutputPortBeingMerged(childS, 0, 0);
6837
6838 /* Update the BufferDstPort flags for each input port */
6839 _ssSetInputPortBufferDstPort(childS, 0, -1);
6840 _ssSetInputPortBufferDstPort(childS, 1, -1);
6841
6842 /* Instance data for generated S-Function: Gain */
6843 {
6844 SimStruct *rts = childS;
6845
6846#include "Gain_sfcn_rtw/Gain_sid.h"
6847
6848 }
6849 }
6850
6851 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S100>/Generated S-Function3 (IntegratorLimited_sf) */
6852 {
6853 SimStruct *childS = ssGetSFunction(rts, 38);
6854
6855 /* timing info */
6856 static time_T sfcnPeriod[1];
6857 static time_T sfcnOffset[1];
6858 static int_T sfcnTsMap[1];
6859 (void) memset((void*)sfcnPeriod, 0,
6860 sizeof(time_T)*1);
6861 (void) memset((void*)sfcnOffset, 0,
6862 sizeof(time_T)*1);
6863 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
6864 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
6865 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
6866
6867 /* Set up the mdlInfo pointer */
6868# ifdef USE_RTMODEL
6869
6870 {
6871 static struct _ssBlkInfo2 _blkInfo2;
6872 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
6873 ssSetBlkInfo2Ptr(childS, blkInfo2);
6874 }
6875
6876 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
6877
6878# else
6879
6880 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
6881
6882# endif /* USE_RTMODEL */
6883
6884 /* Allocate memory of model methods 2 */
6885 {
6886 static struct _ssSFcnModelMethods2 methods2;
6887 ssSetModelMethods2(childS, &methods2);
6888 }
6889
6890 /* Allocate memory of model methods 3 */
6891 {
6892 static struct _ssSFcnModelMethods3 methods3;
6893 ssSetModelMethods3(childS, &methods3);
6894 }
6895
6896 /* Allocate memory for states auxilliary information */
6897 {
6898 static struct _ssStatesInfo2 statesInfo2;
6899 static ssPeriodicStatesInfo periodicStatesInfo;
6900 ssSetStatesInfo2(childS, &statesInfo2);
6901 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
6902 }
6903
6904 /* inputs */
6905 {
6906 static struct _ssPortInputs inputPortInfo[7];
6907 _ssSetNumInputPorts(childS, 7);
6908 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
6909
6910 /* port 0 */
6911 {
6912 static real32_T const *sfcnUPtrs[1];
6913 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
6914 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReuseS;
6915 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
6916 _ssSetInputPortNumDimensions(childS, 0, 1);
6917 ssSetInputPortWidth(childS, 0, 1);
6918 }
6919
6920 /* port 1 */
6921 {
6922 static int8_T const *sfcnUPtrs[1];
6923 sfcnUPtrs[0] = (int8_T const *) &((B_AFCS_MODEL1_T *)
6924 ssGetLocalBlockIO(rts))->DataTypeConversion2_c;
6925 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
6926 _ssSetInputPortNumDimensions(childS, 1, 1);
6927 ssSetInputPortWidth(childS, 1, 1);
6928 }
6929
6930 /* port 2 */
6931 {
6932 static real32_T const *sfcnUPtrs[1];
6933 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled106;
6934 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
6935 _ssSetInputPortNumDimensions(childS, 2, 1);
6936 ssSetInputPortWidth(childS, 2, 1);
6937 }
6938
6939 /* port 3 */
6940 {
6941 static real32_T const *sfcnUPtrs[1];
6942 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled106;
6943 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
6944 _ssSetInputPortNumDimensions(childS, 3, 1);
6945 ssSetInputPortWidth(childS, 3, 1);
6946 }
6947
6948 /* port 4 */
6949 {
6950 static real32_T const *sfcnUPtrs[1];
6951 sfcnUPtrs[0] = (real32_T const *)
6952 &AFCS_MODEL1_ConstP.Constant19_Value;
6953 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
6954 _ssSetInputPortNumDimensions(childS, 4, 1);
6955 ssSetInputPortWidth(childS, 4, 1);
6956 }
6957
6958 /* port 5 */
6959 {
6960 static real32_T const *sfcnUPtrs[1];
6961 sfcnUPtrs[0] = (real32_T const *)
6962 &AFCS_MODEL1_ConstP.Constant76_Value;
6963 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
6964 _ssSetInputPortNumDimensions(childS, 5, 1);
6965 ssSetInputPortWidth(childS, 5, 1);
6966 }
6967
6968 /* port 6 */
6969 {
6970 static real32_T const *sfcnUPtrs[1];
6971 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
6972 ssGetLocalBlockIO(rts))->GeneratedSFunction_h;
6973 _ssSetInputPortSignalPtrs(childS, 6, (InputPtrsType)&sfcnUPtrs[0]);
6974 _ssSetInputPortNumDimensions(childS, 6, 1);
6975 ssSetInputPortWidth(childS, 6, 1);
6976 }
6977 }
6978
6979 /* outputs */
6980 {
6981 static struct _ssPortOutputs outputPortInfo[1];
6982 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
6983 _ssSetNumOutputPorts(childS, 1);
6984
6985 /* port 0 */
6986 {
6987 _ssSetOutputPortNumDimensions(childS, 0, 1);
6988 ssSetOutputPortWidth(childS, 0, 1);
6989 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
6990 *) ssGetLocalBlockIO(rts))->Saturation8));
6991 }
6992 }
6993
6994 /* path info */
6995 _ssSetModelName(childS, "IntegratorLimited_sf");
6996 _ssSetPath(childS,
6997 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/appcLcontrol/GamaLControl/Integrator Limited1/Generated S-Function3");
6998 if (ssGetRTModel(rts) == (NULL)) {
6999 _ssSetParentSS(childS, rts);
7000 _ssSetRootSS(childS, ssGetRootSS(rts));
7001 } else {
7002 ssSetRTModel(childS,ssGetRTModel(rts));
7003 _ssSetParentSS(childS, (NULL));
7004 _ssSetRootSS(childS, childS);
7005 }
7006
7007 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
7008
7009 /* work vectors */
7010 {
7011 static struct _ssDWorkRecord dWorkRecord[4];
7012 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
7013 ssSetSFcnDWork(childS, dWorkRecord);
7014 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
7015 _ssSetNumDWork(childS, 4);
7016
7017 /* DWORK0 */
7018 ssSetDWorkWidth(childS, 0, 1);
7019 ssSetDWorkDataType(childS, 0,SS_SINGLE);
7020 ssSetDWorkComplexSignal(childS, 0, 0);
7021 ssSetDWorkUsedAsDState(childS, 0, 1);
7022 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 176))[0]);
7023
7024 /* DWORK1 */
7025 ssSetDWorkWidth(childS, 1, 1);
7026 ssSetDWorkDataType(childS, 1,SS_SINGLE);
7027 ssSetDWorkComplexSignal(childS, 1, 0);
7028 ssSetDWorkUsedAsDState(childS, 1, 1);
7029 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 177))[0]);
7030
7031 /* DWORK2 */
7032 ssSetDWorkWidth(childS, 2, 1);
7033 ssSetDWorkDataType(childS, 2,SS_INT8);
7034 ssSetDWorkComplexSignal(childS, 2, 0);
7035 ssSetDWorkUsedAsDState(childS, 2, 1);
7036 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 403))[0]);
7037
7038 /* DWORK3 */
7039 ssSetDWorkWidth(childS, 3, 1);
7040 ssSetDWorkDataType(childS, 3,SS_INT8);
7041 ssSetDWorkComplexSignal(childS, 3, 0);
7042 ssSetDWorkUsedAsDState(childS, 3, 1);
7043 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 404))[0]);
7044 }
7045
7046 /* registration */
7047 IntegratorLimited_sf(childS);
7048 sfcnInitializeSizes(childS);
7049 sfcnInitializeSampleTimes(childS);
7050
7051 /* adjust sample time */
7052 ssSetSampleTime(childS, 0, 0.0);
7053 ssSetOffsetTime(childS, 0, 0.0);
7054 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
7055
7056 /* set compiled values of dynamic vector attributes */
7057 ssSetNumNonsampledZCs(childS, 0);
7058
7059 /* Update connectivity flags for each port */
7060 _ssSetInputPortConnected(childS, 0, 1);
7061 _ssSetInputPortConnected(childS, 1, 1);
7062 _ssSetInputPortConnected(childS, 2, 1);
7063 _ssSetInputPortConnected(childS, 3, 1);
7064 _ssSetInputPortConnected(childS, 4, 1);
7065 _ssSetInputPortConnected(childS, 5, 1);
7066 _ssSetInputPortConnected(childS, 6, 1);
7067 _ssSetOutputPortConnected(childS, 0, 1);
7068 _ssSetOutputPortBeingMerged(childS, 0, 0);
7069
7070 /* Update the BufferDstPort flags for each input port */
7071 _ssSetInputPortBufferDstPort(childS, 0, -1);
7072 _ssSetInputPortBufferDstPort(childS, 1, -1);
7073 _ssSetInputPortBufferDstPort(childS, 2, -1);
7074 _ssSetInputPortBufferDstPort(childS, 3, -1);
7075 _ssSetInputPortBufferDstPort(childS, 4, -1);
7076 _ssSetInputPortBufferDstPort(childS, 5, -1);
7077 _ssSetInputPortBufferDstPort(childS, 6, -1);
7078
7079 /* Instance data for generated S-Function: IntegratorLimited */
7080 {
7081 SimStruct *rts = childS;
7082
7083#include "IntegratorLimited_sfcn_rtw/IntegratorLimited_sid.h"
7084
7085 }
7086 }
7087
7088 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S101>/Generated S-Function2 (LeadLagFilter_sf) */
7089 {
7090 SimStruct *childS = ssGetSFunction(rts, 39);
7091
7092 /* timing info */
7093 static time_T sfcnPeriod[1];
7094 static time_T sfcnOffset[1];
7095 static int_T sfcnTsMap[1];
7096 (void) memset((void*)sfcnPeriod, 0,
7097 sizeof(time_T)*1);
7098 (void) memset((void*)sfcnOffset, 0,
7099 sizeof(time_T)*1);
7100 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
7101 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
7102 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
7103
7104 /* Set up the mdlInfo pointer */
7105# ifdef USE_RTMODEL
7106
7107 {
7108 static struct _ssBlkInfo2 _blkInfo2;
7109 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
7110 ssSetBlkInfo2Ptr(childS, blkInfo2);
7111 }
7112
7113 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
7114
7115# else
7116
7117 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
7118
7119# endif /* USE_RTMODEL */
7120
7121 /* Allocate memory of model methods 2 */
7122 {
7123 static struct _ssSFcnModelMethods2 methods2;
7124 ssSetModelMethods2(childS, &methods2);
7125 }
7126
7127 /* Allocate memory of model methods 3 */
7128 {
7129 static struct _ssSFcnModelMethods3 methods3;
7130 ssSetModelMethods3(childS, &methods3);
7131 }
7132
7133 /* Allocate memory for states auxilliary information */
7134 {
7135 static struct _ssStatesInfo2 statesInfo2;
7136 static ssPeriodicStatesInfo periodicStatesInfo;
7137 ssSetStatesInfo2(childS, &statesInfo2);
7138 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
7139 }
7140
7141 /* inputs */
7142 {
7143 static struct _ssPortInputs inputPortInfo[7];
7144 _ssSetNumInputPorts(childS, 7);
7145 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
7146
7147 /* port 0 */
7148 {
7149 static real32_T const *sfcnUPtrs[1];
7150 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
7151 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReuseS;
7152 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
7153 _ssSetInputPortNumDimensions(childS, 0, 1);
7154 ssSetInputPortWidth(childS, 0, 1);
7155 }
7156
7157 /* port 1 */
7158 {
7159 static int8_T const *sfcnUPtrs[1];
7160 sfcnUPtrs[0] = (int8_T const *) &((B_AFCS_MODEL1_T *)
7161 ssGetLocalBlockIO(rts))->DataTypeConversion2_c;
7162 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
7163 _ssSetInputPortNumDimensions(childS, 1, 1);
7164 ssSetInputPortWidth(childS, 1, 1);
7165 }
7166
7167 /* port 2 */
7168 {
7169 static real32_T const *sfcnUPtrs[1];
7170 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled105;
7171 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
7172 _ssSetInputPortNumDimensions(childS, 2, 1);
7173 ssSetInputPortWidth(childS, 2, 1);
7174 }
7175
7176 /* port 3 */
7177 {
7178 static real32_T const *sfcnUPtrs[1];
7179 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled113;
7180 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
7181 _ssSetInputPortNumDimensions(childS, 3, 1);
7182 ssSetInputPortWidth(childS, 3, 1);
7183 }
7184
7185 /* port 4 */
7186 {
7187 static real32_T const *sfcnUPtrs[1];
7188 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
7189 ssGetLocalBlockIO(rts))->Switch_aj;
7190 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
7191 _ssSetInputPortNumDimensions(childS, 4, 1);
7192 ssSetInputPortWidth(childS, 4, 1);
7193 }
7194
7195 /* port 5 */
7196 {
7197 static real32_T const *sfcnUPtrs[1];
7198 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
7199 ssGetLocalBlockIO(rts))->Switch_aj;
7200 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
7201 _ssSetInputPortNumDimensions(childS, 5, 1);
7202 ssSetInputPortWidth(childS, 5, 1);
7203 }
7204
7205 /* port 6 */
7206 {
7207 static real32_T const *sfcnUPtrs[1];
7208 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
7209 ssGetLocalBlockIO(rts))->Divide_e;
7210 _ssSetInputPortSignalPtrs(childS, 6, (InputPtrsType)&sfcnUPtrs[0]);
7211 _ssSetInputPortNumDimensions(childS, 6, 1);
7212 ssSetInputPortWidth(childS, 6, 1);
7213 }
7214 }
7215
7216 /* outputs */
7217 {
7218 static struct _ssPortOutputs outputPortInfo[1];
7219 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
7220 _ssSetNumOutputPorts(childS, 1);
7221
7222 /* port 0 */
7223 {
7224 _ssSetOutputPortNumDimensions(childS, 0, 1);
7225 ssSetOutputPortWidth(childS, 0, 1);
7226 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
7227 *) ssGetLocalBlockIO(rts))->GeneratedSFunction2_j));
7228 }
7229 }
7230
7231 /* path info */
7232 _ssSetModelName(childS, "LeadLagFilter_sf");
7233 _ssSetPath(childS,
7234 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/appcLcontrol/GamaLControl/Lead lag/Generated S-Function2");
7235 if (ssGetRTModel(rts) == (NULL)) {
7236 _ssSetParentSS(childS, rts);
7237 _ssSetRootSS(childS, ssGetRootSS(rts));
7238 } else {
7239 ssSetRTModel(childS,ssGetRTModel(rts));
7240 _ssSetParentSS(childS, (NULL));
7241 _ssSetRootSS(childS, childS);
7242 }
7243
7244 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
7245
7246 /* work vectors */
7247 {
7248 static struct _ssDWorkRecord dWorkRecord[4];
7249 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
7250 ssSetSFcnDWork(childS, dWorkRecord);
7251 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
7252 _ssSetNumDWork(childS, 4);
7253
7254 /* DWORK0 */
7255 ssSetDWorkWidth(childS, 0, 1);
7256 ssSetDWorkDataType(childS, 0,SS_SINGLE);
7257 ssSetDWorkComplexSignal(childS, 0, 0);
7258 ssSetDWorkUsedAsDState(childS, 0, 1);
7259 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 178))[0]);
7260
7261 /* DWORK1 */
7262 ssSetDWorkWidth(childS, 1, 1);
7263 ssSetDWorkDataType(childS, 1,SS_SINGLE);
7264 ssSetDWorkComplexSignal(childS, 1, 0);
7265 ssSetDWorkUsedAsDState(childS, 1, 1);
7266 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 179))[0]);
7267
7268 /* DWORK2 */
7269 ssSetDWorkWidth(childS, 2, 1);
7270 ssSetDWorkDataType(childS, 2,SS_INT8);
7271 ssSetDWorkComplexSignal(childS, 2, 0);
7272 ssSetDWorkUsedAsDState(childS, 2, 1);
7273 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 405))[0]);
7274
7275 /* DWORK3 */
7276 ssSetDWorkWidth(childS, 3, 1);
7277 ssSetDWorkDataType(childS, 3,SS_INT8);
7278 ssSetDWorkComplexSignal(childS, 3, 0);
7279 ssSetDWorkUsedAsDState(childS, 3, 1);
7280 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 406))[0]);
7281 }
7282
7283 /* registration */
7284 LeadLagFilter_sf(childS);
7285 sfcnInitializeSizes(childS);
7286 sfcnInitializeSampleTimes(childS);
7287
7288 /* adjust sample time */
7289 ssSetSampleTime(childS, 0, 0.0);
7290 ssSetOffsetTime(childS, 0, 0.0);
7291 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
7292
7293 /* set compiled values of dynamic vector attributes */
7294 ssSetNumNonsampledZCs(childS, 0);
7295
7296 /* Update connectivity flags for each port */
7297 _ssSetInputPortConnected(childS, 0, 1);
7298 _ssSetInputPortConnected(childS, 1, 1);
7299 _ssSetInputPortConnected(childS, 2, 1);
7300 _ssSetInputPortConnected(childS, 3, 1);
7301 _ssSetInputPortConnected(childS, 4, 1);
7302 _ssSetInputPortConnected(childS, 5, 1);
7303 _ssSetInputPortConnected(childS, 6, 1);
7304 _ssSetOutputPortConnected(childS, 0, 1);
7305 _ssSetOutputPortBeingMerged(childS, 0, 0);
7306
7307 /* Update the BufferDstPort flags for each input port */
7308 _ssSetInputPortBufferDstPort(childS, 0, -1);
7309 _ssSetInputPortBufferDstPort(childS, 1, -1);
7310 _ssSetInputPortBufferDstPort(childS, 2, -1);
7311 _ssSetInputPortBufferDstPort(childS, 3, -1);
7312 _ssSetInputPortBufferDstPort(childS, 4, -1);
7313 _ssSetInputPortBufferDstPort(childS, 5, -1);
7314 _ssSetInputPortBufferDstPort(childS, 6, -1);
7315
7316 /* Instance data for generated S-Function: LeadLagFilter */
7317 {
7318 SimStruct *rts = childS;
7319
7320#include "LeadLagFilter_sfcn_rtw/LeadLagFilter_sid.h"
7321
7322 }
7323 }
7324
7325 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S103>/Generated S-Function1 (SaturationLimiter_sf) */
7326 {
7327 SimStruct *childS = ssGetSFunction(rts, 40);
7328
7329 /* timing info */
7330 static time_T sfcnPeriod[1];
7331 static time_T sfcnOffset[1];
7332 static int_T sfcnTsMap[1];
7333 (void) memset((void*)sfcnPeriod, 0,
7334 sizeof(time_T)*1);
7335 (void) memset((void*)sfcnOffset, 0,
7336 sizeof(time_T)*1);
7337 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
7338 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
7339 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
7340
7341 /* Set up the mdlInfo pointer */
7342# ifdef USE_RTMODEL
7343
7344 {
7345 static struct _ssBlkInfo2 _blkInfo2;
7346 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
7347 ssSetBlkInfo2Ptr(childS, blkInfo2);
7348 }
7349
7350 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
7351
7352# else
7353
7354 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
7355
7356# endif /* USE_RTMODEL */
7357
7358 /* Allocate memory of model methods 2 */
7359 {
7360 static struct _ssSFcnModelMethods2 methods2;
7361 ssSetModelMethods2(childS, &methods2);
7362 }
7363
7364 /* Allocate memory of model methods 3 */
7365 {
7366 static struct _ssSFcnModelMethods3 methods3;
7367 ssSetModelMethods3(childS, &methods3);
7368 }
7369
7370 /* Allocate memory for states auxilliary information */
7371 {
7372 static struct _ssStatesInfo2 statesInfo2;
7373 static ssPeriodicStatesInfo periodicStatesInfo;
7374 ssSetStatesInfo2(childS, &statesInfo2);
7375 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
7376 }
7377
7378 /* inputs */
7379 {
7380 static struct _ssPortInputs inputPortInfo[3];
7381 _ssSetNumInputPorts(childS, 3);
7382 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
7383
7384 /* port 0 */
7385 {
7386 static real32_T const *sfcnUPtrs[1];
7387 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
7388 ssGetLocalBlockIO(rts))->GeneratedSFunction2_j;
7389 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
7390 _ssSetInputPortNumDimensions(childS, 0, 1);
7391 ssSetInputPortWidth(childS, 0, 1);
7392 }
7393
7394 /* port 1 */
7395 {
7396 static real32_T const *sfcnUPtrs[1];
7397 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
7398 ssGetLocalBlockIO(rts))->Product1_m;
7399 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
7400 _ssSetInputPortNumDimensions(childS, 1, 1);
7401 ssSetInputPortWidth(childS, 1, 1);
7402 }
7403
7404 /* port 2 */
7405 {
7406 static real32_T const *sfcnUPtrs[1];
7407 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
7408 ssGetLocalBlockIO(rts))->Product_pp;
7409 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
7410 _ssSetInputPortNumDimensions(childS, 2, 1);
7411 ssSetInputPortWidth(childS, 2, 1);
7412 }
7413 }
7414
7415 /* outputs */
7416 {
7417 static struct _ssPortOutputs outputPortInfo[1];
7418 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
7419 _ssSetNumOutputPorts(childS, 1);
7420
7421 /* port 0 */
7422 {
7423 _ssSetOutputPortNumDimensions(childS, 0, 1);
7424 ssSetOutputPortWidth(childS, 0, 1);
7425 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
7426 *) ssGetLocalBlockIO(rts))->GeneratedSFunction1_e));
7427 }
7428 }
7429
7430 /* path info */
7431 _ssSetModelName(childS, "SaturationLimiter_sf");
7432 _ssSetPath(childS,
7433 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/appcLcontrol/GamaLControl/Saturation Limiter2/Generated S-Function1");
7434 if (ssGetRTModel(rts) == (NULL)) {
7435 _ssSetParentSS(childS, rts);
7436 _ssSetRootSS(childS, ssGetRootSS(rts));
7437 } else {
7438 ssSetRTModel(childS,ssGetRTModel(rts));
7439 _ssSetParentSS(childS, (NULL));
7440 _ssSetRootSS(childS, childS);
7441 }
7442
7443 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
7444
7445 /* registration */
7446 SaturationLimiter_sf(childS);
7447 sfcnInitializeSizes(childS);
7448 sfcnInitializeSampleTimes(childS);
7449
7450 /* adjust sample time */
7451 ssSetSampleTime(childS, 0, 0.0);
7452 ssSetOffsetTime(childS, 0, 0.0);
7453 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
7454
7455 /* set compiled values of dynamic vector attributes */
7456 ssSetNumNonsampledZCs(childS, 0);
7457
7458 /* Update connectivity flags for each port */
7459 _ssSetInputPortConnected(childS, 0, 1);
7460 _ssSetInputPortConnected(childS, 1, 1);
7461 _ssSetInputPortConnected(childS, 2, 1);
7462 _ssSetOutputPortConnected(childS, 0, 1);
7463 _ssSetOutputPortBeingMerged(childS, 0, 0);
7464
7465 /* Update the BufferDstPort flags for each input port */
7466 _ssSetInputPortBufferDstPort(childS, 0, -1);
7467 _ssSetInputPortBufferDstPort(childS, 1, -1);
7468 _ssSetInputPortBufferDstPort(childS, 2, -1);
7469
7470 /* Instance data for generated S-Function: SaturationLimiter */
7471 {
7472 SimStruct *rts = childS;
7473
7474#include "SaturationLimiter_sfcn_rtw/SaturationLimiter_sid.h"
7475
7476 }
7477 }
7478
7479 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S98>/Generated S-Function4 (LagFilter_sf) */
7480 {
7481 SimStruct *childS = ssGetSFunction(rts, 41);
7482
7483 /* timing info */
7484 static time_T sfcnPeriod[1];
7485 static time_T sfcnOffset[1];
7486 static int_T sfcnTsMap[1];
7487 (void) memset((void*)sfcnPeriod, 0,
7488 sizeof(time_T)*1);
7489 (void) memset((void*)sfcnOffset, 0,
7490 sizeof(time_T)*1);
7491 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
7492 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
7493 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
7494
7495 /* Set up the mdlInfo pointer */
7496# ifdef USE_RTMODEL
7497
7498 {
7499 static struct _ssBlkInfo2 _blkInfo2;
7500 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
7501 ssSetBlkInfo2Ptr(childS, blkInfo2);
7502 }
7503
7504 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
7505
7506# else
7507
7508 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
7509
7510# endif /* USE_RTMODEL */
7511
7512 /* Allocate memory of model methods 2 */
7513 {
7514 static struct _ssSFcnModelMethods2 methods2;
7515 ssSetModelMethods2(childS, &methods2);
7516 }
7517
7518 /* Allocate memory of model methods 3 */
7519 {
7520 static struct _ssSFcnModelMethods3 methods3;
7521 ssSetModelMethods3(childS, &methods3);
7522 }
7523
7524 /* Allocate memory for states auxilliary information */
7525 {
7526 static struct _ssStatesInfo2 statesInfo2;
7527 static ssPeriodicStatesInfo periodicStatesInfo;
7528 ssSetStatesInfo2(childS, &statesInfo2);
7529 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
7530 }
7531
7532 /* inputs */
7533 {
7534 static struct _ssPortInputs inputPortInfo[6];
7535 _ssSetNumInputPorts(childS, 6);
7536 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
7537
7538 /* port 0 */
7539 {
7540 static real32_T const *sfcnUPtrs[1];
7541 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
7542 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReuseS;
7543 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
7544 _ssSetInputPortNumDimensions(childS, 0, 1);
7545 ssSetInputPortWidth(childS, 0, 1);
7546 }
7547
7548 /* port 1 */
7549 {
7550 static int8_T const *sfcnUPtrs[1];
7551 sfcnUPtrs[0] = (int8_T const *) &((B_AFCS_MODEL1_T *)
7552 ssGetLocalBlockIO(rts))->DataTypeConversion2_c;
7553 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
7554 _ssSetInputPortNumDimensions(childS, 1, 1);
7555 ssSetInputPortWidth(childS, 1, 1);
7556 }
7557
7558 /* port 2 */
7559 {
7560 static real32_T const *sfcnUPtrs[1];
7561 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled107;
7562 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
7563 _ssSetInputPortNumDimensions(childS, 2, 1);
7564 ssSetInputPortWidth(childS, 2, 1);
7565 }
7566
7567 /* port 3 */
7568 {
7569 static real32_T const *sfcnUPtrs[1];
7570 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
7571 ssGetLocalBlockIO(rts))->Switch_aj;
7572 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
7573 _ssSetInputPortNumDimensions(childS, 3, 1);
7574 ssSetInputPortWidth(childS, 3, 1);
7575 }
7576
7577 /* port 4 */
7578 {
7579 static real32_T const *sfcnUPtrs[1];
7580 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
7581 ssGetLocalBlockIO(rts))->Switch_aj;
7582 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
7583 _ssSetInputPortNumDimensions(childS, 4, 1);
7584 ssSetInputPortWidth(childS, 4, 1);
7585 }
7586
7587 /* port 5 */
7588 {
7589 static real32_T const *sfcnUPtrs[1];
7590 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
7591 ssGetLocalBlockIO(rts))->GeneratedSFunction1_e;
7592 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
7593 _ssSetInputPortNumDimensions(childS, 5, 1);
7594 ssSetInputPortWidth(childS, 5, 1);
7595 }
7596 }
7597
7598 /* outputs */
7599 {
7600 static struct _ssPortOutputs outputPortInfo[1];
7601 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
7602 _ssSetNumOutputPorts(childS, 1);
7603
7604 /* port 0 */
7605 {
7606 _ssSetOutputPortNumDimensions(childS, 0, 1);
7607 ssSetOutputPortWidth(childS, 0, 1);
7608 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
7609 *) ssGetLocalBlockIO(rts))->GeneratedSFunction4_c));
7610 }
7611 }
7612
7613 /* path info */
7614 _ssSetModelName(childS, "LagFilter_sf");
7615 _ssSetPath(childS,
7616 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/appcLcontrol/GamaLControl/ lag filter/Generated S-Function4");
7617 if (ssGetRTModel(rts) == (NULL)) {
7618 _ssSetParentSS(childS, rts);
7619 _ssSetRootSS(childS, ssGetRootSS(rts));
7620 } else {
7621 ssSetRTModel(childS,ssGetRTModel(rts));
7622 _ssSetParentSS(childS, (NULL));
7623 _ssSetRootSS(childS, childS);
7624 }
7625
7626 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
7627
7628 /* work vectors */
7629 {
7630 static struct _ssDWorkRecord dWorkRecord[4];
7631 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
7632 ssSetSFcnDWork(childS, dWorkRecord);
7633 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
7634 _ssSetNumDWork(childS, 4);
7635
7636 /* DWORK0 */
7637 ssSetDWorkWidth(childS, 0, 1);
7638 ssSetDWorkDataType(childS, 0,SS_SINGLE);
7639 ssSetDWorkComplexSignal(childS, 0, 0);
7640 ssSetDWorkUsedAsDState(childS, 0, 1);
7641 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 180))[0]);
7642
7643 /* DWORK1 */
7644 ssSetDWorkWidth(childS, 1, 1);
7645 ssSetDWorkDataType(childS, 1,SS_SINGLE);
7646 ssSetDWorkComplexSignal(childS, 1, 0);
7647 ssSetDWorkUsedAsDState(childS, 1, 1);
7648 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 181))[0]);
7649
7650 /* DWORK2 */
7651 ssSetDWorkWidth(childS, 2, 1);
7652 ssSetDWorkDataType(childS, 2,SS_INT8);
7653 ssSetDWorkComplexSignal(childS, 2, 0);
7654 ssSetDWorkUsedAsDState(childS, 2, 1);
7655 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 407))[0]);
7656
7657 /* DWORK3 */
7658 ssSetDWorkWidth(childS, 3, 1);
7659 ssSetDWorkDataType(childS, 3,SS_INT8);
7660 ssSetDWorkComplexSignal(childS, 3, 0);
7661 ssSetDWorkUsedAsDState(childS, 3, 1);
7662 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 408))[0]);
7663 }
7664
7665 /* registration */
7666 LagFilter_sf(childS);
7667 sfcnInitializeSizes(childS);
7668 sfcnInitializeSampleTimes(childS);
7669
7670 /* adjust sample time */
7671 ssSetSampleTime(childS, 0, 0.0);
7672 ssSetOffsetTime(childS, 0, 0.0);
7673 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
7674
7675 /* set compiled values of dynamic vector attributes */
7676 ssSetNumNonsampledZCs(childS, 0);
7677
7678 /* Update connectivity flags for each port */
7679 _ssSetInputPortConnected(childS, 0, 1);
7680 _ssSetInputPortConnected(childS, 1, 1);
7681 _ssSetInputPortConnected(childS, 2, 1);
7682 _ssSetInputPortConnected(childS, 3, 1);
7683 _ssSetInputPortConnected(childS, 4, 1);
7684 _ssSetInputPortConnected(childS, 5, 1);
7685 _ssSetOutputPortConnected(childS, 0, 1);
7686 _ssSetOutputPortBeingMerged(childS, 0, 0);
7687
7688 /* Update the BufferDstPort flags for each input port */
7689 _ssSetInputPortBufferDstPort(childS, 0, -1);
7690 _ssSetInputPortBufferDstPort(childS, 1, -1);
7691 _ssSetInputPortBufferDstPort(childS, 2, -1);
7692 _ssSetInputPortBufferDstPort(childS, 3, -1);
7693 _ssSetInputPortBufferDstPort(childS, 4, -1);
7694 _ssSetInputPortBufferDstPort(childS, 5, -1);
7695
7696 /* Instance data for generated S-Function: LagFilter */
7697 {
7698 SimStruct *rts = childS;
7699
7700#include "LagFilter_sfcn_rtw/LagFilter_sid.h"
7701
7702 }
7703 }
7704
7705 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S109>/Generated S-Function1 (SaturationLimiter_sf) */
7706 {
7707 SimStruct *childS = ssGetSFunction(rts, 42);
7708
7709 /* timing info */
7710 static time_T sfcnPeriod[1];
7711 static time_T sfcnOffset[1];
7712 static int_T sfcnTsMap[1];
7713 (void) memset((void*)sfcnPeriod, 0,
7714 sizeof(time_T)*1);
7715 (void) memset((void*)sfcnOffset, 0,
7716 sizeof(time_T)*1);
7717 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
7718 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
7719 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
7720
7721 /* Set up the mdlInfo pointer */
7722# ifdef USE_RTMODEL
7723
7724 {
7725 static struct _ssBlkInfo2 _blkInfo2;
7726 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
7727 ssSetBlkInfo2Ptr(childS, blkInfo2);
7728 }
7729
7730 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
7731
7732# else
7733
7734 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
7735
7736# endif /* USE_RTMODEL */
7737
7738 /* Allocate memory of model methods 2 */
7739 {
7740 static struct _ssSFcnModelMethods2 methods2;
7741 ssSetModelMethods2(childS, &methods2);
7742 }
7743
7744 /* Allocate memory of model methods 3 */
7745 {
7746 static struct _ssSFcnModelMethods3 methods3;
7747 ssSetModelMethods3(childS, &methods3);
7748 }
7749
7750 /* Allocate memory for states auxilliary information */
7751 {
7752 static struct _ssStatesInfo2 statesInfo2;
7753 static ssPeriodicStatesInfo periodicStatesInfo;
7754 ssSetStatesInfo2(childS, &statesInfo2);
7755 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
7756 }
7757
7758 /* inputs */
7759 {
7760 static struct _ssPortInputs inputPortInfo[3];
7761 _ssSetNumInputPorts(childS, 3);
7762 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
7763
7764 /* port 0 */
7765 {
7766 static real32_T const *sfcnUPtrs[1];
7767 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
7768 ssGetLocalBlockIO(rts))->Sum1_i;
7769 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
7770 _ssSetInputPortNumDimensions(childS, 0, 1);
7771 ssSetInputPortWidth(childS, 0, 1);
7772 }
7773
7774 /* port 1 */
7775 {
7776 static real32_T const *sfcnUPtrs[1];
7777 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled111;
7778 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
7779 _ssSetInputPortNumDimensions(childS, 1, 1);
7780 ssSetInputPortWidth(childS, 1, 1);
7781 }
7782
7783 /* port 2 */
7784 {
7785 static real32_T const *sfcnUPtrs[1];
7786 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled112;
7787 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
7788 _ssSetInputPortNumDimensions(childS, 2, 1);
7789 ssSetInputPortWidth(childS, 2, 1);
7790 }
7791 }
7792
7793 /* outputs */
7794 {
7795 static struct _ssPortOutputs outputPortInfo[1];
7796 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
7797 _ssSetNumOutputPorts(childS, 1);
7798
7799 /* port 0 */
7800 {
7801 _ssSetOutputPortNumDimensions(childS, 0, 1);
7802 ssSetOutputPortWidth(childS, 0, 1);
7803 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
7804 *) ssGetLocalBlockIO(rts))->GeneratedSFunction1_g));
7805 }
7806 }
7807
7808 /* path info */
7809 _ssSetModelName(childS, "SaturationLimiter_sf");
7810 _ssSetPath(childS,
7811 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/appcLcontrol/HdotLControl/Saturation Limiter1/Generated S-Function1");
7812 if (ssGetRTModel(rts) == (NULL)) {
7813 _ssSetParentSS(childS, rts);
7814 _ssSetRootSS(childS, ssGetRootSS(rts));
7815 } else {
7816 ssSetRTModel(childS,ssGetRTModel(rts));
7817 _ssSetParentSS(childS, (NULL));
7818 _ssSetRootSS(childS, childS);
7819 }
7820
7821 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
7822
7823 /* registration */
7824 SaturationLimiter_sf(childS);
7825 sfcnInitializeSizes(childS);
7826 sfcnInitializeSampleTimes(childS);
7827
7828 /* adjust sample time */
7829 ssSetSampleTime(childS, 0, 0.0);
7830 ssSetOffsetTime(childS, 0, 0.0);
7831 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
7832
7833 /* set compiled values of dynamic vector attributes */
7834 ssSetNumNonsampledZCs(childS, 0);
7835
7836 /* Update connectivity flags for each port */
7837 _ssSetInputPortConnected(childS, 0, 1);
7838 _ssSetInputPortConnected(childS, 1, 1);
7839 _ssSetInputPortConnected(childS, 2, 1);
7840 _ssSetOutputPortConnected(childS, 0, 1);
7841 _ssSetOutputPortBeingMerged(childS, 0, 0);
7842
7843 /* Update the BufferDstPort flags for each input port */
7844 _ssSetInputPortBufferDstPort(childS, 0, -1);
7845 _ssSetInputPortBufferDstPort(childS, 1, -1);
7846 _ssSetInputPortBufferDstPort(childS, 2, -1);
7847
7848 /* Instance data for generated S-Function: SaturationLimiter */
7849 {
7850 SimStruct *rts = childS;
7851
7852#include "SaturationLimiter_sfcn_rtw/SaturationLimiter_sid.h"
7853
7854 }
7855 }
7856
7857 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S111>/Generated S-Function (Gain_sf) */
7858 {
7859 SimStruct *childS = ssGetSFunction(rts, 43);
7860
7861 /* timing info */
7862 static time_T sfcnPeriod[1];
7863 static time_T sfcnOffset[1];
7864 static int_T sfcnTsMap[1];
7865 (void) memset((void*)sfcnPeriod, 0,
7866 sizeof(time_T)*1);
7867 (void) memset((void*)sfcnOffset, 0,
7868 sizeof(time_T)*1);
7869 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
7870 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
7871 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
7872
7873 /* Set up the mdlInfo pointer */
7874# ifdef USE_RTMODEL
7875
7876 {
7877 static struct _ssBlkInfo2 _blkInfo2;
7878 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
7879 ssSetBlkInfo2Ptr(childS, blkInfo2);
7880 }
7881
7882 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
7883
7884# else
7885
7886 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
7887
7888# endif /* USE_RTMODEL */
7889
7890 /* Allocate memory of model methods 2 */
7891 {
7892 static struct _ssSFcnModelMethods2 methods2;
7893 ssSetModelMethods2(childS, &methods2);
7894 }
7895
7896 /* Allocate memory of model methods 3 */
7897 {
7898 static struct _ssSFcnModelMethods3 methods3;
7899 ssSetModelMethods3(childS, &methods3);
7900 }
7901
7902 /* Allocate memory for states auxilliary information */
7903 {
7904 static struct _ssStatesInfo2 statesInfo2;
7905 static ssPeriodicStatesInfo periodicStatesInfo;
7906 ssSetStatesInfo2(childS, &statesInfo2);
7907 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
7908 }
7909
7910 /* inputs */
7911 {
7912 static struct _ssPortInputs inputPortInfo[2];
7913 _ssSetNumInputPorts(childS, 2);
7914 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
7915
7916 /* port 0 */
7917 {
7918 static real32_T const *sfcnUPtrs[1];
7919 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
7920 ssGetLocalBlockIO(rts))->GeneratedSFunction1_g;
7921 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
7922 _ssSetInputPortNumDimensions(childS, 0, 1);
7923 ssSetInputPortWidth(childS, 0, 1);
7924 }
7925
7926 /* port 1 */
7927 {
7928 static real32_T const *sfcnUPtrs[1];
7929 sfcnUPtrs[0] = (real32_T const *)
7930 &AFCS_MODEL1_ConstP.Constant13_Value_n;
7931 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
7932 _ssSetInputPortNumDimensions(childS, 1, 1);
7933 ssSetInputPortWidth(childS, 1, 1);
7934 }
7935 }
7936
7937 /* outputs */
7938 {
7939 static struct _ssPortOutputs outputPortInfo[1];
7940 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
7941 _ssSetNumOutputPorts(childS, 1);
7942
7943 /* port 0 */
7944 {
7945 _ssSetOutputPortNumDimensions(childS, 0, 1);
7946 ssSetOutputPortWidth(childS, 0, 1);
7947 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
7948 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_nx));
7949 }
7950 }
7951
7952 /* path info */
7953 _ssSetModelName(childS, "Gain_sf");
7954 _ssSetPath(childS,
7955 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/appcLcontrol/HdotLControl/gain/Generated S-Function");
7956 if (ssGetRTModel(rts) == (NULL)) {
7957 _ssSetParentSS(childS, rts);
7958 _ssSetRootSS(childS, ssGetRootSS(rts));
7959 } else {
7960 ssSetRTModel(childS,ssGetRTModel(rts));
7961 _ssSetParentSS(childS, (NULL));
7962 _ssSetRootSS(childS, childS);
7963 }
7964
7965 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
7966
7967 /* registration */
7968 Gain_sf(childS);
7969 sfcnInitializeSizes(childS);
7970 sfcnInitializeSampleTimes(childS);
7971
7972 /* adjust sample time */
7973 ssSetSampleTime(childS, 0, 0.0);
7974 ssSetOffsetTime(childS, 0, 0.0);
7975 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
7976
7977 /* set compiled values of dynamic vector attributes */
7978 ssSetNumNonsampledZCs(childS, 0);
7979
7980 /* Update connectivity flags for each port */
7981 _ssSetInputPortConnected(childS, 0, 1);
7982 _ssSetInputPortConnected(childS, 1, 1);
7983 _ssSetOutputPortConnected(childS, 0, 1);
7984 _ssSetOutputPortBeingMerged(childS, 0, 0);
7985
7986 /* Update the BufferDstPort flags for each input port */
7987 _ssSetInputPortBufferDstPort(childS, 0, -1);
7988 _ssSetInputPortBufferDstPort(childS, 1, -1);
7989
7990 /* Instance data for generated S-Function: Gain */
7991 {
7992 SimStruct *rts = childS;
7993
7994#include "Gain_sfcn_rtw/Gain_sid.h"
7995
7996 }
7997 }
7998
7999 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S112>/Generated S-Function (Gain_sf) */
8000 {
8001 SimStruct *childS = ssGetSFunction(rts, 44);
8002
8003 /* timing info */
8004 static time_T sfcnPeriod[1];
8005 static time_T sfcnOffset[1];
8006 static int_T sfcnTsMap[1];
8007 (void) memset((void*)sfcnPeriod, 0,
8008 sizeof(time_T)*1);
8009 (void) memset((void*)sfcnOffset, 0,
8010 sizeof(time_T)*1);
8011 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
8012 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
8013 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
8014
8015 /* Set up the mdlInfo pointer */
8016# ifdef USE_RTMODEL
8017
8018 {
8019 static struct _ssBlkInfo2 _blkInfo2;
8020 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
8021 ssSetBlkInfo2Ptr(childS, blkInfo2);
8022 }
8023
8024 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
8025
8026# else
8027
8028 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
8029
8030# endif /* USE_RTMODEL */
8031
8032 /* Allocate memory of model methods 2 */
8033 {
8034 static struct _ssSFcnModelMethods2 methods2;
8035 ssSetModelMethods2(childS, &methods2);
8036 }
8037
8038 /* Allocate memory of model methods 3 */
8039 {
8040 static struct _ssSFcnModelMethods3 methods3;
8041 ssSetModelMethods3(childS, &methods3);
8042 }
8043
8044 /* Allocate memory for states auxilliary information */
8045 {
8046 static struct _ssStatesInfo2 statesInfo2;
8047 static ssPeriodicStatesInfo periodicStatesInfo;
8048 ssSetStatesInfo2(childS, &statesInfo2);
8049 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
8050 }
8051
8052 /* inputs */
8053 {
8054 static struct _ssPortInputs inputPortInfo[2];
8055 _ssSetNumInputPorts(childS, 2);
8056 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
8057
8058 /* port 0 */
8059 {
8060 static real32_T const *sfcnUPtrs[1];
8061 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
8062 ssGetLocalBlockIO(rts))->GeneratedSFunction_nx;
8063 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
8064 _ssSetInputPortNumDimensions(childS, 0, 1);
8065 ssSetInputPortWidth(childS, 0, 1);
8066 }
8067
8068 /* port 1 */
8069 {
8070 static real32_T const *sfcnUPtrs[1];
8071 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled116;
8072 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
8073 _ssSetInputPortNumDimensions(childS, 1, 1);
8074 ssSetInputPortWidth(childS, 1, 1);
8075 }
8076 }
8077
8078 /* outputs */
8079 {
8080 static struct _ssPortOutputs outputPortInfo[1];
8081 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
8082 _ssSetNumOutputPorts(childS, 1);
8083
8084 /* port 0 */
8085 {
8086 _ssSetOutputPortNumDimensions(childS, 0, 1);
8087 ssSetOutputPortWidth(childS, 0, 1);
8088 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
8089 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_d));
8090 }
8091 }
8092
8093 /* path info */
8094 _ssSetModelName(childS, "Gain_sf");
8095 _ssSetPath(childS,
8096 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/appcLcontrol/HdotLControl/gain4/Generated S-Function");
8097 if (ssGetRTModel(rts) == (NULL)) {
8098 _ssSetParentSS(childS, rts);
8099 _ssSetRootSS(childS, ssGetRootSS(rts));
8100 } else {
8101 ssSetRTModel(childS,ssGetRTModel(rts));
8102 _ssSetParentSS(childS, (NULL));
8103 _ssSetRootSS(childS, childS);
8104 }
8105
8106 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
8107
8108 /* registration */
8109 Gain_sf(childS);
8110 sfcnInitializeSizes(childS);
8111 sfcnInitializeSampleTimes(childS);
8112
8113 /* adjust sample time */
8114 ssSetSampleTime(childS, 0, 0.0);
8115 ssSetOffsetTime(childS, 0, 0.0);
8116 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
8117
8118 /* set compiled values of dynamic vector attributes */
8119 ssSetNumNonsampledZCs(childS, 0);
8120
8121 /* Update connectivity flags for each port */
8122 _ssSetInputPortConnected(childS, 0, 1);
8123 _ssSetInputPortConnected(childS, 1, 1);
8124 _ssSetOutputPortConnected(childS, 0, 1);
8125 _ssSetOutputPortBeingMerged(childS, 0, 0);
8126
8127 /* Update the BufferDstPort flags for each input port */
8128 _ssSetInputPortBufferDstPort(childS, 0, -1);
8129 _ssSetInputPortBufferDstPort(childS, 1, -1);
8130
8131 /* Instance data for generated S-Function: Gain */
8132 {
8133 SimStruct *rts = childS;
8134
8135#include "Gain_sfcn_rtw/Gain_sid.h"
8136
8137 }
8138 }
8139
8140 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S107>/Generated S-Function3 (IntegratorLimited_sf) */
8141 {
8142 SimStruct *childS = ssGetSFunction(rts, 45);
8143
8144 /* timing info */
8145 static time_T sfcnPeriod[1];
8146 static time_T sfcnOffset[1];
8147 static int_T sfcnTsMap[1];
8148 (void) memset((void*)sfcnPeriod, 0,
8149 sizeof(time_T)*1);
8150 (void) memset((void*)sfcnOffset, 0,
8151 sizeof(time_T)*1);
8152 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
8153 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
8154 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
8155
8156 /* Set up the mdlInfo pointer */
8157# ifdef USE_RTMODEL
8158
8159 {
8160 static struct _ssBlkInfo2 _blkInfo2;
8161 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
8162 ssSetBlkInfo2Ptr(childS, blkInfo2);
8163 }
8164
8165 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
8166
8167# else
8168
8169 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
8170
8171# endif /* USE_RTMODEL */
8172
8173 /* Allocate memory of model methods 2 */
8174 {
8175 static struct _ssSFcnModelMethods2 methods2;
8176 ssSetModelMethods2(childS, &methods2);
8177 }
8178
8179 /* Allocate memory of model methods 3 */
8180 {
8181 static struct _ssSFcnModelMethods3 methods3;
8182 ssSetModelMethods3(childS, &methods3);
8183 }
8184
8185 /* Allocate memory for states auxilliary information */
8186 {
8187 static struct _ssStatesInfo2 statesInfo2;
8188 static ssPeriodicStatesInfo periodicStatesInfo;
8189 ssSetStatesInfo2(childS, &statesInfo2);
8190 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
8191 }
8192
8193 /* inputs */
8194 {
8195 static struct _ssPortInputs inputPortInfo[7];
8196 _ssSetNumInputPorts(childS, 7);
8197 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
8198
8199 /* port 0 */
8200 {
8201 static real32_T const *sfcnUPtrs[1];
8202 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
8203 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReuseS;
8204 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
8205 _ssSetInputPortNumDimensions(childS, 0, 1);
8206 ssSetInputPortWidth(childS, 0, 1);
8207 }
8208
8209 /* port 1 */
8210 {
8211 static int8_T const *sfcnUPtrs[1];
8212 sfcnUPtrs[0] = (int8_T const *) &((B_AFCS_MODEL1_T *)
8213 ssGetLocalBlockIO(rts))->DataTypeConversion4_k;
8214 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
8215 _ssSetInputPortNumDimensions(childS, 1, 1);
8216 ssSetInputPortWidth(childS, 1, 1);
8217 }
8218
8219 /* port 2 */
8220 {
8221 static real32_T const *sfcnUPtrs[1];
8222 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled106;
8223 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
8224 _ssSetInputPortNumDimensions(childS, 2, 1);
8225 ssSetInputPortWidth(childS, 2, 1);
8226 }
8227
8228 /* port 3 */
8229 {
8230 static real32_T const *sfcnUPtrs[1];
8231 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled106;
8232 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
8233 _ssSetInputPortNumDimensions(childS, 3, 1);
8234 ssSetInputPortWidth(childS, 3, 1);
8235 }
8236
8237 /* port 4 */
8238 {
8239 static real32_T const *sfcnUPtrs[1];
8240 sfcnUPtrs[0] = (real32_T const *)
8241 &AFCS_MODEL1_ConstP.Constant19_Value;
8242 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
8243 _ssSetInputPortNumDimensions(childS, 4, 1);
8244 ssSetInputPortWidth(childS, 4, 1);
8245 }
8246
8247 /* port 5 */
8248 {
8249 static real32_T const *sfcnUPtrs[1];
8250 sfcnUPtrs[0] = (real32_T const *)
8251 &AFCS_MODEL1_ConstP.Constant76_Value;
8252 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
8253 _ssSetInputPortNumDimensions(childS, 5, 1);
8254 ssSetInputPortWidth(childS, 5, 1);
8255 }
8256
8257 /* port 6 */
8258 {
8259 static real32_T const *sfcnUPtrs[1];
8260 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
8261 ssGetLocalBlockIO(rts))->GeneratedSFunction_d;
8262 _ssSetInputPortSignalPtrs(childS, 6, (InputPtrsType)&sfcnUPtrs[0]);
8263 _ssSetInputPortNumDimensions(childS, 6, 1);
8264 ssSetInputPortWidth(childS, 6, 1);
8265 }
8266 }
8267
8268 /* outputs */
8269 {
8270 static struct _ssPortOutputs outputPortInfo[1];
8271 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
8272 _ssSetNumOutputPorts(childS, 1);
8273
8274 /* port 0 */
8275 {
8276 _ssSetOutputPortNumDimensions(childS, 0, 1);
8277 ssSetOutputPortWidth(childS, 0, 1);
8278 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
8279 *) ssGetLocalBlockIO(rts))->Saturation8));
8280 }
8281 }
8282
8283 /* path info */
8284 _ssSetModelName(childS, "IntegratorLimited_sf");
8285 _ssSetPath(childS,
8286 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/appcLcontrol/HdotLControl/Integrator Limited1/Generated S-Function3");
8287 if (ssGetRTModel(rts) == (NULL)) {
8288 _ssSetParentSS(childS, rts);
8289 _ssSetRootSS(childS, ssGetRootSS(rts));
8290 } else {
8291 ssSetRTModel(childS,ssGetRTModel(rts));
8292 _ssSetParentSS(childS, (NULL));
8293 _ssSetRootSS(childS, childS);
8294 }
8295
8296 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
8297
8298 /* work vectors */
8299 {
8300 static struct _ssDWorkRecord dWorkRecord[4];
8301 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
8302 ssSetSFcnDWork(childS, dWorkRecord);
8303 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
8304 _ssSetNumDWork(childS, 4);
8305
8306 /* DWORK0 */
8307 ssSetDWorkWidth(childS, 0, 1);
8308 ssSetDWorkDataType(childS, 0,SS_SINGLE);
8309 ssSetDWorkComplexSignal(childS, 0, 0);
8310 ssSetDWorkUsedAsDState(childS, 0, 1);
8311 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 182))[0]);
8312
8313 /* DWORK1 */
8314 ssSetDWorkWidth(childS, 1, 1);
8315 ssSetDWorkDataType(childS, 1,SS_SINGLE);
8316 ssSetDWorkComplexSignal(childS, 1, 0);
8317 ssSetDWorkUsedAsDState(childS, 1, 1);
8318 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 183))[0]);
8319
8320 /* DWORK2 */
8321 ssSetDWorkWidth(childS, 2, 1);
8322 ssSetDWorkDataType(childS, 2,SS_INT8);
8323 ssSetDWorkComplexSignal(childS, 2, 0);
8324 ssSetDWorkUsedAsDState(childS, 2, 1);
8325 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 409))[0]);
8326
8327 /* DWORK3 */
8328 ssSetDWorkWidth(childS, 3, 1);
8329 ssSetDWorkDataType(childS, 3,SS_INT8);
8330 ssSetDWorkComplexSignal(childS, 3, 0);
8331 ssSetDWorkUsedAsDState(childS, 3, 1);
8332 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 410))[0]);
8333 }
8334
8335 /* registration */
8336 IntegratorLimited_sf(childS);
8337 sfcnInitializeSizes(childS);
8338 sfcnInitializeSampleTimes(childS);
8339
8340 /* adjust sample time */
8341 ssSetSampleTime(childS, 0, 0.0);
8342 ssSetOffsetTime(childS, 0, 0.0);
8343 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
8344
8345 /* set compiled values of dynamic vector attributes */
8346 ssSetNumNonsampledZCs(childS, 0);
8347
8348 /* Update connectivity flags for each port */
8349 _ssSetInputPortConnected(childS, 0, 1);
8350 _ssSetInputPortConnected(childS, 1, 1);
8351 _ssSetInputPortConnected(childS, 2, 1);
8352 _ssSetInputPortConnected(childS, 3, 1);
8353 _ssSetInputPortConnected(childS, 4, 1);
8354 _ssSetInputPortConnected(childS, 5, 1);
8355 _ssSetInputPortConnected(childS, 6, 1);
8356 _ssSetOutputPortConnected(childS, 0, 1);
8357 _ssSetOutputPortBeingMerged(childS, 0, 0);
8358
8359 /* Update the BufferDstPort flags for each input port */
8360 _ssSetInputPortBufferDstPort(childS, 0, -1);
8361 _ssSetInputPortBufferDstPort(childS, 1, -1);
8362 _ssSetInputPortBufferDstPort(childS, 2, -1);
8363 _ssSetInputPortBufferDstPort(childS, 3, -1);
8364 _ssSetInputPortBufferDstPort(childS, 4, -1);
8365 _ssSetInputPortBufferDstPort(childS, 5, -1);
8366 _ssSetInputPortBufferDstPort(childS, 6, -1);
8367
8368 /* Instance data for generated S-Function: IntegratorLimited */
8369 {
8370 SimStruct *rts = childS;
8371
8372#include "IntegratorLimited_sfcn_rtw/IntegratorLimited_sid.h"
8373
8374 }
8375 }
8376
8377 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S108>/Generated S-Function2 (LeadLagFilter_sf) */
8378 {
8379 SimStruct *childS = ssGetSFunction(rts, 46);
8380
8381 /* timing info */
8382 static time_T sfcnPeriod[1];
8383 static time_T sfcnOffset[1];
8384 static int_T sfcnTsMap[1];
8385 (void) memset((void*)sfcnPeriod, 0,
8386 sizeof(time_T)*1);
8387 (void) memset((void*)sfcnOffset, 0,
8388 sizeof(time_T)*1);
8389 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
8390 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
8391 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
8392
8393 /* Set up the mdlInfo pointer */
8394# ifdef USE_RTMODEL
8395
8396 {
8397 static struct _ssBlkInfo2 _blkInfo2;
8398 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
8399 ssSetBlkInfo2Ptr(childS, blkInfo2);
8400 }
8401
8402 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
8403
8404# else
8405
8406 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
8407
8408# endif /* USE_RTMODEL */
8409
8410 /* Allocate memory of model methods 2 */
8411 {
8412 static struct _ssSFcnModelMethods2 methods2;
8413 ssSetModelMethods2(childS, &methods2);
8414 }
8415
8416 /* Allocate memory of model methods 3 */
8417 {
8418 static struct _ssSFcnModelMethods3 methods3;
8419 ssSetModelMethods3(childS, &methods3);
8420 }
8421
8422 /* Allocate memory for states auxilliary information */
8423 {
8424 static struct _ssStatesInfo2 statesInfo2;
8425 static ssPeriodicStatesInfo periodicStatesInfo;
8426 ssSetStatesInfo2(childS, &statesInfo2);
8427 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
8428 }
8429
8430 /* inputs */
8431 {
8432 static struct _ssPortInputs inputPortInfo[7];
8433 _ssSetNumInputPorts(childS, 7);
8434 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
8435
8436 /* port 0 */
8437 {
8438 static real32_T const *sfcnUPtrs[1];
8439 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
8440 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReuseS;
8441 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
8442 _ssSetInputPortNumDimensions(childS, 0, 1);
8443 ssSetInputPortWidth(childS, 0, 1);
8444 }
8445
8446 /* port 1 */
8447 {
8448 static int8_T const *sfcnUPtrs[1];
8449 sfcnUPtrs[0] = (int8_T const *) &((B_AFCS_MODEL1_T *)
8450 ssGetLocalBlockIO(rts))->DataTypeConversion4_k;
8451 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
8452 _ssSetInputPortNumDimensions(childS, 1, 1);
8453 ssSetInputPortWidth(childS, 1, 1);
8454 }
8455
8456 /* port 2 */
8457 {
8458 static real32_T const *sfcnUPtrs[1];
8459 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled105;
8460 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
8461 _ssSetInputPortNumDimensions(childS, 2, 1);
8462 ssSetInputPortWidth(childS, 2, 1);
8463 }
8464
8465 /* port 3 */
8466 {
8467 static real32_T const *sfcnUPtrs[1];
8468 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled113;
8469 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
8470 _ssSetInputPortNumDimensions(childS, 3, 1);
8471 ssSetInputPortWidth(childS, 3, 1);
8472 }
8473
8474 /* port 4 */
8475 {
8476 static real32_T const *sfcnUPtrs[1];
8477 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
8478 ssGetLocalBlockIO(rts))->Switch_aj;
8479 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
8480 _ssSetInputPortNumDimensions(childS, 4, 1);
8481 ssSetInputPortWidth(childS, 4, 1);
8482 }
8483
8484 /* port 5 */
8485 {
8486 static real32_T const *sfcnUPtrs[1];
8487 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
8488 ssGetLocalBlockIO(rts))->Switch_aj;
8489 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
8490 _ssSetInputPortNumDimensions(childS, 5, 1);
8491 ssSetInputPortWidth(childS, 5, 1);
8492 }
8493
8494 /* port 6 */
8495 {
8496 static real32_T const *sfcnUPtrs[1];
8497 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
8498 ssGetLocalBlockIO(rts))->Divide_ez;
8499 _ssSetInputPortSignalPtrs(childS, 6, (InputPtrsType)&sfcnUPtrs[0]);
8500 _ssSetInputPortNumDimensions(childS, 6, 1);
8501 ssSetInputPortWidth(childS, 6, 1);
8502 }
8503 }
8504
8505 /* outputs */
8506 {
8507 static struct _ssPortOutputs outputPortInfo[1];
8508 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
8509 _ssSetNumOutputPorts(childS, 1);
8510
8511 /* port 0 */
8512 {
8513 _ssSetOutputPortNumDimensions(childS, 0, 1);
8514 ssSetOutputPortWidth(childS, 0, 1);
8515 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
8516 *) ssGetLocalBlockIO(rts))->GeneratedSFunction2_b));
8517 }
8518 }
8519
8520 /* path info */
8521 _ssSetModelName(childS, "LeadLagFilter_sf");
8522 _ssSetPath(childS,
8523 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/appcLcontrol/HdotLControl/Lead lag/Generated S-Function2");
8524 if (ssGetRTModel(rts) == (NULL)) {
8525 _ssSetParentSS(childS, rts);
8526 _ssSetRootSS(childS, ssGetRootSS(rts));
8527 } else {
8528 ssSetRTModel(childS,ssGetRTModel(rts));
8529 _ssSetParentSS(childS, (NULL));
8530 _ssSetRootSS(childS, childS);
8531 }
8532
8533 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
8534
8535 /* work vectors */
8536 {
8537 static struct _ssDWorkRecord dWorkRecord[4];
8538 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
8539 ssSetSFcnDWork(childS, dWorkRecord);
8540 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
8541 _ssSetNumDWork(childS, 4);
8542
8543 /* DWORK0 */
8544 ssSetDWorkWidth(childS, 0, 1);
8545 ssSetDWorkDataType(childS, 0,SS_SINGLE);
8546 ssSetDWorkComplexSignal(childS, 0, 0);
8547 ssSetDWorkUsedAsDState(childS, 0, 1);
8548 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 184))[0]);
8549
8550 /* DWORK1 */
8551 ssSetDWorkWidth(childS, 1, 1);
8552 ssSetDWorkDataType(childS, 1,SS_SINGLE);
8553 ssSetDWorkComplexSignal(childS, 1, 0);
8554 ssSetDWorkUsedAsDState(childS, 1, 1);
8555 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 185))[0]);
8556
8557 /* DWORK2 */
8558 ssSetDWorkWidth(childS, 2, 1);
8559 ssSetDWorkDataType(childS, 2,SS_INT8);
8560 ssSetDWorkComplexSignal(childS, 2, 0);
8561 ssSetDWorkUsedAsDState(childS, 2, 1);
8562 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 411))[0]);
8563
8564 /* DWORK3 */
8565 ssSetDWorkWidth(childS, 3, 1);
8566 ssSetDWorkDataType(childS, 3,SS_INT8);
8567 ssSetDWorkComplexSignal(childS, 3, 0);
8568 ssSetDWorkUsedAsDState(childS, 3, 1);
8569 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 412))[0]);
8570 }
8571
8572 /* registration */
8573 LeadLagFilter_sf(childS);
8574 sfcnInitializeSizes(childS);
8575 sfcnInitializeSampleTimes(childS);
8576
8577 /* adjust sample time */
8578 ssSetSampleTime(childS, 0, 0.0);
8579 ssSetOffsetTime(childS, 0, 0.0);
8580 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
8581
8582 /* set compiled values of dynamic vector attributes */
8583 ssSetNumNonsampledZCs(childS, 0);
8584
8585 /* Update connectivity flags for each port */
8586 _ssSetInputPortConnected(childS, 0, 1);
8587 _ssSetInputPortConnected(childS, 1, 1);
8588 _ssSetInputPortConnected(childS, 2, 1);
8589 _ssSetInputPortConnected(childS, 3, 1);
8590 _ssSetInputPortConnected(childS, 4, 1);
8591 _ssSetInputPortConnected(childS, 5, 1);
8592 _ssSetInputPortConnected(childS, 6, 1);
8593 _ssSetOutputPortConnected(childS, 0, 1);
8594 _ssSetOutputPortBeingMerged(childS, 0, 0);
8595
8596 /* Update the BufferDstPort flags for each input port */
8597 _ssSetInputPortBufferDstPort(childS, 0, -1);
8598 _ssSetInputPortBufferDstPort(childS, 1, -1);
8599 _ssSetInputPortBufferDstPort(childS, 2, -1);
8600 _ssSetInputPortBufferDstPort(childS, 3, -1);
8601 _ssSetInputPortBufferDstPort(childS, 4, -1);
8602 _ssSetInputPortBufferDstPort(childS, 5, -1);
8603 _ssSetInputPortBufferDstPort(childS, 6, -1);
8604
8605 /* Instance data for generated S-Function: LeadLagFilter */
8606 {
8607 SimStruct *rts = childS;
8608
8609#include "LeadLagFilter_sfcn_rtw/LeadLagFilter_sid.h"
8610
8611 }
8612 }
8613
8614 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S110>/Generated S-Function1 (SaturationLimiter_sf) */
8615 {
8616 SimStruct *childS = ssGetSFunction(rts, 47);
8617
8618 /* timing info */
8619 static time_T sfcnPeriod[1];
8620 static time_T sfcnOffset[1];
8621 static int_T sfcnTsMap[1];
8622 (void) memset((void*)sfcnPeriod, 0,
8623 sizeof(time_T)*1);
8624 (void) memset((void*)sfcnOffset, 0,
8625 sizeof(time_T)*1);
8626 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
8627 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
8628 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
8629
8630 /* Set up the mdlInfo pointer */
8631# ifdef USE_RTMODEL
8632
8633 {
8634 static struct _ssBlkInfo2 _blkInfo2;
8635 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
8636 ssSetBlkInfo2Ptr(childS, blkInfo2);
8637 }
8638
8639 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
8640
8641# else
8642
8643 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
8644
8645# endif /* USE_RTMODEL */
8646
8647 /* Allocate memory of model methods 2 */
8648 {
8649 static struct _ssSFcnModelMethods2 methods2;
8650 ssSetModelMethods2(childS, &methods2);
8651 }
8652
8653 /* Allocate memory of model methods 3 */
8654 {
8655 static struct _ssSFcnModelMethods3 methods3;
8656 ssSetModelMethods3(childS, &methods3);
8657 }
8658
8659 /* Allocate memory for states auxilliary information */
8660 {
8661 static struct _ssStatesInfo2 statesInfo2;
8662 static ssPeriodicStatesInfo periodicStatesInfo;
8663 ssSetStatesInfo2(childS, &statesInfo2);
8664 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
8665 }
8666
8667 /* inputs */
8668 {
8669 static struct _ssPortInputs inputPortInfo[3];
8670 _ssSetNumInputPorts(childS, 3);
8671 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
8672
8673 /* port 0 */
8674 {
8675 static real32_T const *sfcnUPtrs[1];
8676 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
8677 ssGetLocalBlockIO(rts))->GeneratedSFunction2_b;
8678 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
8679 _ssSetInputPortNumDimensions(childS, 0, 1);
8680 ssSetInputPortWidth(childS, 0, 1);
8681 }
8682
8683 /* port 1 */
8684 {
8685 static real32_T const *sfcnUPtrs[1];
8686 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
8687 ssGetLocalBlockIO(rts))->Product1_m;
8688 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
8689 _ssSetInputPortNumDimensions(childS, 1, 1);
8690 ssSetInputPortWidth(childS, 1, 1);
8691 }
8692
8693 /* port 2 */
8694 {
8695 static real32_T const *sfcnUPtrs[1];
8696 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
8697 ssGetLocalBlockIO(rts))->Product_pp;
8698 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
8699 _ssSetInputPortNumDimensions(childS, 2, 1);
8700 ssSetInputPortWidth(childS, 2, 1);
8701 }
8702 }
8703
8704 /* outputs */
8705 {
8706 static struct _ssPortOutputs outputPortInfo[1];
8707 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
8708 _ssSetNumOutputPorts(childS, 1);
8709
8710 /* port 0 */
8711 {
8712 _ssSetOutputPortNumDimensions(childS, 0, 1);
8713 ssSetOutputPortWidth(childS, 0, 1);
8714 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
8715 *) ssGetLocalBlockIO(rts))->GeneratedSFunction1_l));
8716 }
8717 }
8718
8719 /* path info */
8720 _ssSetModelName(childS, "SaturationLimiter_sf");
8721 _ssSetPath(childS,
8722 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/appcLcontrol/HdotLControl/Saturation Limiter2/Generated S-Function1");
8723 if (ssGetRTModel(rts) == (NULL)) {
8724 _ssSetParentSS(childS, rts);
8725 _ssSetRootSS(childS, ssGetRootSS(rts));
8726 } else {
8727 ssSetRTModel(childS,ssGetRTModel(rts));
8728 _ssSetParentSS(childS, (NULL));
8729 _ssSetRootSS(childS, childS);
8730 }
8731
8732 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
8733
8734 /* registration */
8735 SaturationLimiter_sf(childS);
8736 sfcnInitializeSizes(childS);
8737 sfcnInitializeSampleTimes(childS);
8738
8739 /* adjust sample time */
8740 ssSetSampleTime(childS, 0, 0.0);
8741 ssSetOffsetTime(childS, 0, 0.0);
8742 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
8743
8744 /* set compiled values of dynamic vector attributes */
8745 ssSetNumNonsampledZCs(childS, 0);
8746
8747 /* Update connectivity flags for each port */
8748 _ssSetInputPortConnected(childS, 0, 1);
8749 _ssSetInputPortConnected(childS, 1, 1);
8750 _ssSetInputPortConnected(childS, 2, 1);
8751 _ssSetOutputPortConnected(childS, 0, 1);
8752 _ssSetOutputPortBeingMerged(childS, 0, 0);
8753
8754 /* Update the BufferDstPort flags for each input port */
8755 _ssSetInputPortBufferDstPort(childS, 0, -1);
8756 _ssSetInputPortBufferDstPort(childS, 1, -1);
8757 _ssSetInputPortBufferDstPort(childS, 2, -1);
8758
8759 /* Instance data for generated S-Function: SaturationLimiter */
8760 {
8761 SimStruct *rts = childS;
8762
8763#include "SaturationLimiter_sfcn_rtw/SaturationLimiter_sid.h"
8764
8765 }
8766 }
8767
8768 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S106>/Generated S-Function4 (LagFilter_sf) */
8769 {
8770 SimStruct *childS = ssGetSFunction(rts, 48);
8771
8772 /* timing info */
8773 static time_T sfcnPeriod[1];
8774 static time_T sfcnOffset[1];
8775 static int_T sfcnTsMap[1];
8776 (void) memset((void*)sfcnPeriod, 0,
8777 sizeof(time_T)*1);
8778 (void) memset((void*)sfcnOffset, 0,
8779 sizeof(time_T)*1);
8780 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
8781 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
8782 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
8783
8784 /* Set up the mdlInfo pointer */
8785# ifdef USE_RTMODEL
8786
8787 {
8788 static struct _ssBlkInfo2 _blkInfo2;
8789 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
8790 ssSetBlkInfo2Ptr(childS, blkInfo2);
8791 }
8792
8793 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
8794
8795# else
8796
8797 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
8798
8799# endif /* USE_RTMODEL */
8800
8801 /* Allocate memory of model methods 2 */
8802 {
8803 static struct _ssSFcnModelMethods2 methods2;
8804 ssSetModelMethods2(childS, &methods2);
8805 }
8806
8807 /* Allocate memory of model methods 3 */
8808 {
8809 static struct _ssSFcnModelMethods3 methods3;
8810 ssSetModelMethods3(childS, &methods3);
8811 }
8812
8813 /* Allocate memory for states auxilliary information */
8814 {
8815 static struct _ssStatesInfo2 statesInfo2;
8816 static ssPeriodicStatesInfo periodicStatesInfo;
8817 ssSetStatesInfo2(childS, &statesInfo2);
8818 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
8819 }
8820
8821 /* inputs */
8822 {
8823 static struct _ssPortInputs inputPortInfo[6];
8824 _ssSetNumInputPorts(childS, 6);
8825 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
8826
8827 /* port 0 */
8828 {
8829 static real32_T const *sfcnUPtrs[1];
8830 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
8831 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReuseS;
8832 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
8833 _ssSetInputPortNumDimensions(childS, 0, 1);
8834 ssSetInputPortWidth(childS, 0, 1);
8835 }
8836
8837 /* port 1 */
8838 {
8839 static int8_T const *sfcnUPtrs[1];
8840 sfcnUPtrs[0] = (int8_T const *) &((B_AFCS_MODEL1_T *)
8841 ssGetLocalBlockIO(rts))->DataTypeConversion4_k;
8842 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
8843 _ssSetInputPortNumDimensions(childS, 1, 1);
8844 ssSetInputPortWidth(childS, 1, 1);
8845 }
8846
8847 /* port 2 */
8848 {
8849 static real32_T const *sfcnUPtrs[1];
8850 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled107;
8851 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
8852 _ssSetInputPortNumDimensions(childS, 2, 1);
8853 ssSetInputPortWidth(childS, 2, 1);
8854 }
8855
8856 /* port 3 */
8857 {
8858 static real32_T const *sfcnUPtrs[1];
8859 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
8860 ssGetLocalBlockIO(rts))->Switch_aj;
8861 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
8862 _ssSetInputPortNumDimensions(childS, 3, 1);
8863 ssSetInputPortWidth(childS, 3, 1);
8864 }
8865
8866 /* port 4 */
8867 {
8868 static real32_T const *sfcnUPtrs[1];
8869 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
8870 ssGetLocalBlockIO(rts))->Switch_aj;
8871 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
8872 _ssSetInputPortNumDimensions(childS, 4, 1);
8873 ssSetInputPortWidth(childS, 4, 1);
8874 }
8875
8876 /* port 5 */
8877 {
8878 static real32_T const *sfcnUPtrs[1];
8879 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
8880 ssGetLocalBlockIO(rts))->GeneratedSFunction1_l;
8881 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
8882 _ssSetInputPortNumDimensions(childS, 5, 1);
8883 ssSetInputPortWidth(childS, 5, 1);
8884 }
8885 }
8886
8887 /* outputs */
8888 {
8889 static struct _ssPortOutputs outputPortInfo[1];
8890 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
8891 _ssSetNumOutputPorts(childS, 1);
8892
8893 /* port 0 */
8894 {
8895 _ssSetOutputPortNumDimensions(childS, 0, 1);
8896 ssSetOutputPortWidth(childS, 0, 1);
8897 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
8898 *) ssGetLocalBlockIO(rts))->GeneratedSFunction4_n));
8899 }
8900 }
8901
8902 /* path info */
8903 _ssSetModelName(childS, "LagFilter_sf");
8904 _ssSetPath(childS,
8905 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/appcLcontrol/HdotLControl/ lag filter/Generated S-Function4");
8906 if (ssGetRTModel(rts) == (NULL)) {
8907 _ssSetParentSS(childS, rts);
8908 _ssSetRootSS(childS, ssGetRootSS(rts));
8909 } else {
8910 ssSetRTModel(childS,ssGetRTModel(rts));
8911 _ssSetParentSS(childS, (NULL));
8912 _ssSetRootSS(childS, childS);
8913 }
8914
8915 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
8916
8917 /* work vectors */
8918 {
8919 static struct _ssDWorkRecord dWorkRecord[4];
8920 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
8921 ssSetSFcnDWork(childS, dWorkRecord);
8922 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
8923 _ssSetNumDWork(childS, 4);
8924
8925 /* DWORK0 */
8926 ssSetDWorkWidth(childS, 0, 1);
8927 ssSetDWorkDataType(childS, 0,SS_SINGLE);
8928 ssSetDWorkComplexSignal(childS, 0, 0);
8929 ssSetDWorkUsedAsDState(childS, 0, 1);
8930 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 186))[0]);
8931
8932 /* DWORK1 */
8933 ssSetDWorkWidth(childS, 1, 1);
8934 ssSetDWorkDataType(childS, 1,SS_SINGLE);
8935 ssSetDWorkComplexSignal(childS, 1, 0);
8936 ssSetDWorkUsedAsDState(childS, 1, 1);
8937 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 187))[0]);
8938
8939 /* DWORK2 */
8940 ssSetDWorkWidth(childS, 2, 1);
8941 ssSetDWorkDataType(childS, 2,SS_INT8);
8942 ssSetDWorkComplexSignal(childS, 2, 0);
8943 ssSetDWorkUsedAsDState(childS, 2, 1);
8944 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 413))[0]);
8945
8946 /* DWORK3 */
8947 ssSetDWorkWidth(childS, 3, 1);
8948 ssSetDWorkDataType(childS, 3,SS_INT8);
8949 ssSetDWorkComplexSignal(childS, 3, 0);
8950 ssSetDWorkUsedAsDState(childS, 3, 1);
8951 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 414))[0]);
8952 }
8953
8954 /* registration */
8955 LagFilter_sf(childS);
8956 sfcnInitializeSizes(childS);
8957 sfcnInitializeSampleTimes(childS);
8958
8959 /* adjust sample time */
8960 ssSetSampleTime(childS, 0, 0.0);
8961 ssSetOffsetTime(childS, 0, 0.0);
8962 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
8963
8964 /* set compiled values of dynamic vector attributes */
8965 ssSetNumNonsampledZCs(childS, 0);
8966
8967 /* Update connectivity flags for each port */
8968 _ssSetInputPortConnected(childS, 0, 1);
8969 _ssSetInputPortConnected(childS, 1, 1);
8970 _ssSetInputPortConnected(childS, 2, 1);
8971 _ssSetInputPortConnected(childS, 3, 1);
8972 _ssSetInputPortConnected(childS, 4, 1);
8973 _ssSetInputPortConnected(childS, 5, 1);
8974 _ssSetOutputPortConnected(childS, 0, 1);
8975 _ssSetOutputPortBeingMerged(childS, 0, 0);
8976
8977 /* Update the BufferDstPort flags for each input port */
8978 _ssSetInputPortBufferDstPort(childS, 0, -1);
8979 _ssSetInputPortBufferDstPort(childS, 1, -1);
8980 _ssSetInputPortBufferDstPort(childS, 2, -1);
8981 _ssSetInputPortBufferDstPort(childS, 3, -1);
8982 _ssSetInputPortBufferDstPort(childS, 4, -1);
8983 _ssSetInputPortBufferDstPort(childS, 5, -1);
8984
8985 /* Instance data for generated S-Function: LagFilter */
8986 {
8987 SimStruct *rts = childS;
8988
8989#include "LagFilter_sfcn_rtw/LagFilter_sid.h"
8990
8991 }
8992 }
8993
8994 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S81>/Generated S-Function5 (Fader_sf) */
8995 {
8996 SimStruct *childS = ssGetSFunction(rts, 49);
8997
8998 /* timing info */
8999 static time_T sfcnPeriod[1];
9000 static time_T sfcnOffset[1];
9001 static int_T sfcnTsMap[1];
9002 (void) memset((void*)sfcnPeriod, 0,
9003 sizeof(time_T)*1);
9004 (void) memset((void*)sfcnOffset, 0,
9005 sizeof(time_T)*1);
9006 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
9007 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
9008 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
9009
9010 /* Set up the mdlInfo pointer */
9011# ifdef USE_RTMODEL
9012
9013 {
9014 static struct _ssBlkInfo2 _blkInfo2;
9015 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
9016 ssSetBlkInfo2Ptr(childS, blkInfo2);
9017 }
9018
9019 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
9020
9021# else
9022
9023 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
9024
9025# endif /* USE_RTMODEL */
9026
9027 /* Allocate memory of model methods 2 */
9028 {
9029 static struct _ssSFcnModelMethods2 methods2;
9030 ssSetModelMethods2(childS, &methods2);
9031 }
9032
9033 /* Allocate memory of model methods 3 */
9034 {
9035 static struct _ssSFcnModelMethods3 methods3;
9036 ssSetModelMethods3(childS, &methods3);
9037 }
9038
9039 /* Allocate memory for states auxilliary information */
9040 {
9041 static struct _ssStatesInfo2 statesInfo2;
9042 static ssPeriodicStatesInfo periodicStatesInfo;
9043 ssSetStatesInfo2(childS, &statesInfo2);
9044 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
9045 }
9046
9047 /* inputs */
9048 {
9049 static struct _ssPortInputs inputPortInfo[6];
9050 _ssSetNumInputPorts(childS, 6);
9051 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
9052
9053 /* port 0 */
9054 {
9055 static real32_T const *sfcnUPtrs[1];
9056 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
9057 ssGetLocalBlockIO(rts))->MultiportSwitch2;
9058 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
9059 _ssSetInputPortNumDimensions(childS, 0, 1);
9060 ssSetInputPortWidth(childS, 0, 1);
9061 }
9062
9063 /* port 1 */
9064 {
9065 static real32_T const *sfcnUPtrs[1];
9066 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
9067 ssGetLocalBlockIO(rts))->MultiportSwitch2;
9068 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
9069 _ssSetInputPortNumDimensions(childS, 1, 1);
9070 ssSetInputPortWidth(childS, 1, 1);
9071 }
9072
9073 /* port 2 */
9074 {
9075 static int8_T const *sfcnUPtrs[1];
9076 sfcnUPtrs[0] = (int8_T const *) &((B_AFCS_MODEL1_T *)
9077 ssGetLocalBlockIO(rts))->Switch9;
9078 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
9079 _ssSetInputPortNumDimensions(childS, 2, 1);
9080 ssSetInputPortWidth(childS, 2, 1);
9081 }
9082
9083 /* port 3 */
9084 {
9085 static int8_T const *sfcnUPtrs[1];
9086 sfcnUPtrs[0] = (int8_T const *) &AFCS_MODEL1_ConstP.pooled143;
9087 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
9088 _ssSetInputPortNumDimensions(childS, 3, 1);
9089 ssSetInputPortWidth(childS, 3, 1);
9090 }
9091
9092 /* port 4 */
9093 {
9094 static real32_T const *sfcnUPtrs[1];
9095 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled116;
9096 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
9097 _ssSetInputPortNumDimensions(childS, 4, 1);
9098 ssSetInputPortWidth(childS, 4, 1);
9099 }
9100
9101 /* port 5 */
9102 {
9103 static real32_T const *sfcnUPtrs[1];
9104 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
9105 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReuseS;
9106 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
9107 _ssSetInputPortNumDimensions(childS, 5, 1);
9108 ssSetInputPortWidth(childS, 5, 1);
9109 }
9110 }
9111
9112 /* outputs */
9113 {
9114 static struct _ssPortOutputs outputPortInfo[1];
9115 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
9116 _ssSetNumOutputPorts(childS, 1);
9117
9118 /* port 0 */
9119 {
9120 _ssSetOutputPortNumDimensions(childS, 0, 1);
9121 ssSetOutputPortWidth(childS, 0, 1);
9122 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
9123 *) ssGetLocalBlockIO(rts))->appc));
9124 }
9125 }
9126
9127 /* path info */
9128 _ssSetModelName(childS, "Fader_sf");
9129 _ssSetPath(childS,
9130 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/appcLcontrol/Fader/Generated S-Function5");
9131 if (ssGetRTModel(rts) == (NULL)) {
9132 _ssSetParentSS(childS, rts);
9133 _ssSetRootSS(childS, ssGetRootSS(rts));
9134 } else {
9135 ssSetRTModel(childS,ssGetRTModel(rts));
9136 _ssSetParentSS(childS, (NULL));
9137 _ssSetRootSS(childS, childS);
9138 }
9139
9140 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
9141
9142 /* work vectors */
9143 {
9144 static struct _ssDWorkRecord dWorkRecord[7];
9145 static struct _ssDWorkAuxRecord dWorkAuxRecord[7];
9146 ssSetSFcnDWork(childS, dWorkRecord);
9147 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
9148 _ssSetNumDWork(childS, 7);
9149
9150 /* DWORK0 */
9151 ssSetDWorkWidth(childS, 0, 1);
9152 ssSetDWorkDataType(childS, 0,SS_SINGLE);
9153 ssSetDWorkComplexSignal(childS, 0, 0);
9154 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 289))[0]);
9155
9156 /* DWORK1 */
9157 ssSetDWorkWidth(childS, 1, 1);
9158 ssSetDWorkDataType(childS, 1,SS_SINGLE);
9159 ssSetDWorkComplexSignal(childS, 1, 0);
9160 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 290))[0]);
9161
9162 /* DWORK2 */
9163 ssSetDWorkWidth(childS, 2, 1);
9164 ssSetDWorkDataType(childS, 2,SS_SINGLE);
9165 ssSetDWorkComplexSignal(childS, 2, 0);
9166 _ssSetDWork(childS, 2, &((real32_T*) ssGetDWork(rts, 291))[0]);
9167
9168 /* DWORK3 */
9169 ssSetDWorkWidth(childS, 3, 1);
9170 ssSetDWorkDataType(childS, 3,SS_INT32);
9171 ssSetDWorkComplexSignal(childS, 3, 0);
9172 _ssSetDWork(childS, 3, &((int32_T*) ssGetDWork(rts, 332))[0]);
9173
9174 /* DWORK4 */
9175 ssSetDWorkWidth(childS, 4, 1);
9176 ssSetDWorkDataType(childS, 4,SS_INT32);
9177 ssSetDWorkComplexSignal(childS, 4, 0);
9178 _ssSetDWork(childS, 4, &((int32_T*) ssGetDWork(rts, 333))[0]);
9179
9180 /* DWORK5 */
9181 ssSetDWorkWidth(childS, 5, 1);
9182 ssSetDWorkDataType(childS, 5,SS_INT8);
9183 ssSetDWorkComplexSignal(childS, 5, 0);
9184 _ssSetDWork(childS, 5, &((int8_T*) ssGetDWork(rts, 517))[0]);
9185
9186 /* DWORK6 */
9187 ssSetDWorkWidth(childS, 6, 1);
9188 ssSetDWorkDataType(childS, 6,SS_INT8);
9189 ssSetDWorkComplexSignal(childS, 6, 0);
9190 _ssSetDWork(childS, 6, &((int8_T*) ssGetDWork(rts, 518))[0]);
9191 }
9192
9193 /* registration */
9194 Fader_sf(childS);
9195 sfcnInitializeSizes(childS);
9196 sfcnInitializeSampleTimes(childS);
9197
9198 /* adjust sample time */
9199 ssSetSampleTime(childS, 0, 0.0);
9200 ssSetOffsetTime(childS, 0, 0.0);
9201 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
9202
9203 /* set compiled values of dynamic vector attributes */
9204 ssSetNumNonsampledZCs(childS, 0);
9205
9206 /* Update connectivity flags for each port */
9207 _ssSetInputPortConnected(childS, 0, 1);
9208 _ssSetInputPortConnected(childS, 1, 1);
9209 _ssSetInputPortConnected(childS, 2, 1);
9210 _ssSetInputPortConnected(childS, 3, 1);
9211 _ssSetInputPortConnected(childS, 4, 1);
9212 _ssSetInputPortConnected(childS, 5, 1);
9213 _ssSetOutputPortConnected(childS, 0, 1);
9214 _ssSetOutputPortBeingMerged(childS, 0, 0);
9215
9216 /* Update the BufferDstPort flags for each input port */
9217 _ssSetInputPortBufferDstPort(childS, 0, -1);
9218 _ssSetInputPortBufferDstPort(childS, 1, -1);
9219 _ssSetInputPortBufferDstPort(childS, 2, -1);
9220 _ssSetInputPortBufferDstPort(childS, 3, -1);
9221 _ssSetInputPortBufferDstPort(childS, 4, -1);
9222 _ssSetInputPortBufferDstPort(childS, 5, -1);
9223
9224 /* Instance data for generated S-Function: Fader */
9225 {
9226 SimStruct *rts = childS;
9227
9228#include "Fader_sfcn_rtw/Fader_sid.h"
9229
9230 }
9231 }
9232
9233 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S130>/Generated S-Function4 (LagFilter_sf) */
9234 {
9235 SimStruct *childS = ssGetSFunction(rts, 50);
9236
9237 /* timing info */
9238 static time_T sfcnPeriod[1];
9239 static time_T sfcnOffset[1];
9240 static int_T sfcnTsMap[1];
9241 (void) memset((void*)sfcnPeriod, 0,
9242 sizeof(time_T)*1);
9243 (void) memset((void*)sfcnOffset, 0,
9244 sizeof(time_T)*1);
9245 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
9246 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
9247 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
9248
9249 /* Set up the mdlInfo pointer */
9250# ifdef USE_RTMODEL
9251
9252 {
9253 static struct _ssBlkInfo2 _blkInfo2;
9254 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
9255 ssSetBlkInfo2Ptr(childS, blkInfo2);
9256 }
9257
9258 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
9259
9260# else
9261
9262 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
9263
9264# endif /* USE_RTMODEL */
9265
9266 /* Allocate memory of model methods 2 */
9267 {
9268 static struct _ssSFcnModelMethods2 methods2;
9269 ssSetModelMethods2(childS, &methods2);
9270 }
9271
9272 /* Allocate memory of model methods 3 */
9273 {
9274 static struct _ssSFcnModelMethods3 methods3;
9275 ssSetModelMethods3(childS, &methods3);
9276 }
9277
9278 /* Allocate memory for states auxilliary information */
9279 {
9280 static struct _ssStatesInfo2 statesInfo2;
9281 static ssPeriodicStatesInfo periodicStatesInfo;
9282 ssSetStatesInfo2(childS, &statesInfo2);
9283 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
9284 }
9285
9286 /* inputs */
9287 {
9288 static struct _ssPortInputs inputPortInfo[6];
9289 _ssSetNumInputPorts(childS, 6);
9290 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
9291
9292 /* port 0 */
9293 {
9294 static real32_T const *sfcnUPtrs[1];
9295 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
9296 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReuseS;
9297 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
9298 _ssSetInputPortNumDimensions(childS, 0, 1);
9299 ssSetInputPortWidth(childS, 0, 1);
9300 }
9301
9302 /* port 1 */
9303 {
9304 static int8_T const *sfcnUPtrs[1];
9305 sfcnUPtrs[0] = (int8_T const *) &((B_AFCS_MODEL1_T *)
9306 ssGetLocalBlockIO(rts))->DataTypeConversion5_n;
9307 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
9308 _ssSetInputPortNumDimensions(childS, 1, 1);
9309 ssSetInputPortWidth(childS, 1, 1);
9310 }
9311
9312 /* port 2 */
9313 {
9314 static real32_T const *sfcnUPtrs[1];
9315 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled107;
9316 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
9317 _ssSetInputPortNumDimensions(childS, 2, 1);
9318 ssSetInputPortWidth(childS, 2, 1);
9319 }
9320
9321 /* port 3 */
9322 {
9323 static real32_T const *sfcnUPtrs[1];
9324 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
9325 ssGetLocalBlockIO(rts))->Switch_bg;
9326 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
9327 _ssSetInputPortNumDimensions(childS, 3, 1);
9328 ssSetInputPortWidth(childS, 3, 1);
9329 }
9330
9331 /* port 4 */
9332 {
9333 static real32_T const *sfcnUPtrs[1];
9334 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
9335 ssGetLocalBlockIO(rts))->Switch_bg;
9336 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
9337 _ssSetInputPortNumDimensions(childS, 4, 1);
9338 ssSetInputPortWidth(childS, 4, 1);
9339 }
9340
9341 /* port 5 */
9342 {
9343 static real32_T const *sfcnUPtrs[1];
9344 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled106;
9345 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
9346 _ssSetInputPortNumDimensions(childS, 5, 1);
9347 ssSetInputPortWidth(childS, 5, 1);
9348 }
9349 }
9350
9351 /* outputs */
9352 {
9353 static struct _ssPortOutputs outputPortInfo[1];
9354 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
9355 _ssSetNumOutputPorts(childS, 1);
9356
9357 /* port 0 */
9358 {
9359 _ssSetOutputPortNumDimensions(childS, 0, 1);
9360 ssSetOutputPortWidth(childS, 0, 1);
9361 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
9362 *) ssGetLocalBlockIO(rts))->GeneratedSFunction4_b));
9363 }
9364 }
9365
9366 /* path info */
9367 _ssSetModelName(childS, "LagFilter_sf");
9368 _ssSetPath(childS,
9369 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/PLControl/ lag filter/Generated S-Function4");
9370 if (ssGetRTModel(rts) == (NULL)) {
9371 _ssSetParentSS(childS, rts);
9372 _ssSetRootSS(childS, ssGetRootSS(rts));
9373 } else {
9374 ssSetRTModel(childS,ssGetRTModel(rts));
9375 _ssSetParentSS(childS, (NULL));
9376 _ssSetRootSS(childS, childS);
9377 }
9378
9379 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
9380
9381 /* work vectors */
9382 {
9383 static struct _ssDWorkRecord dWorkRecord[4];
9384 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
9385 ssSetSFcnDWork(childS, dWorkRecord);
9386 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
9387 _ssSetNumDWork(childS, 4);
9388
9389 /* DWORK0 */
9390 ssSetDWorkWidth(childS, 0, 1);
9391 ssSetDWorkDataType(childS, 0,SS_SINGLE);
9392 ssSetDWorkComplexSignal(childS, 0, 0);
9393 ssSetDWorkUsedAsDState(childS, 0, 1);
9394 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 189))[0]);
9395
9396 /* DWORK1 */
9397 ssSetDWorkWidth(childS, 1, 1);
9398 ssSetDWorkDataType(childS, 1,SS_SINGLE);
9399 ssSetDWorkComplexSignal(childS, 1, 0);
9400 ssSetDWorkUsedAsDState(childS, 1, 1);
9401 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 190))[0]);
9402
9403 /* DWORK2 */
9404 ssSetDWorkWidth(childS, 2, 1);
9405 ssSetDWorkDataType(childS, 2,SS_INT8);
9406 ssSetDWorkComplexSignal(childS, 2, 0);
9407 ssSetDWorkUsedAsDState(childS, 2, 1);
9408 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 417))[0]);
9409
9410 /* DWORK3 */
9411 ssSetDWorkWidth(childS, 3, 1);
9412 ssSetDWorkDataType(childS, 3,SS_INT8);
9413 ssSetDWorkComplexSignal(childS, 3, 0);
9414 ssSetDWorkUsedAsDState(childS, 3, 1);
9415 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 418))[0]);
9416 }
9417
9418 /* registration */
9419 LagFilter_sf(childS);
9420 sfcnInitializeSizes(childS);
9421 sfcnInitializeSampleTimes(childS);
9422
9423 /* adjust sample time */
9424 ssSetSampleTime(childS, 0, 0.0);
9425 ssSetOffsetTime(childS, 0, 0.0);
9426 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
9427
9428 /* set compiled values of dynamic vector attributes */
9429 ssSetNumNonsampledZCs(childS, 0);
9430
9431 /* Update connectivity flags for each port */
9432 _ssSetInputPortConnected(childS, 0, 1);
9433 _ssSetInputPortConnected(childS, 1, 1);
9434 _ssSetInputPortConnected(childS, 2, 1);
9435 _ssSetInputPortConnected(childS, 3, 1);
9436 _ssSetInputPortConnected(childS, 4, 1);
9437 _ssSetInputPortConnected(childS, 5, 1);
9438 _ssSetOutputPortConnected(childS, 0, 1);
9439 _ssSetOutputPortBeingMerged(childS, 0, 0);
9440
9441 /* Update the BufferDstPort flags for each input port */
9442 _ssSetInputPortBufferDstPort(childS, 0, -1);
9443 _ssSetInputPortBufferDstPort(childS, 1, -1);
9444 _ssSetInputPortBufferDstPort(childS, 2, -1);
9445 _ssSetInputPortBufferDstPort(childS, 3, -1);
9446 _ssSetInputPortBufferDstPort(childS, 4, -1);
9447 _ssSetInputPortBufferDstPort(childS, 5, -1);
9448
9449 /* Instance data for generated S-Function: LagFilter */
9450 {
9451 SimStruct *rts = childS;
9452
9453#include "LagFilter_sfcn_rtw/LagFilter_sid.h"
9454
9455 }
9456 }
9457
9458 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S125>/Generated S-Function6 (Res180_sf) */
9459 {
9460 SimStruct *childS = ssGetSFunction(rts, 51);
9461
9462 /* timing info */
9463 static time_T sfcnPeriod[1];
9464 static time_T sfcnOffset[1];
9465 static int_T sfcnTsMap[1];
9466 (void) memset((void*)sfcnPeriod, 0,
9467 sizeof(time_T)*1);
9468 (void) memset((void*)sfcnOffset, 0,
9469 sizeof(time_T)*1);
9470 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
9471 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
9472 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
9473
9474 /* Set up the mdlInfo pointer */
9475# ifdef USE_RTMODEL
9476
9477 {
9478 static struct _ssBlkInfo2 _blkInfo2;
9479 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
9480 ssSetBlkInfo2Ptr(childS, blkInfo2);
9481 }
9482
9483 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
9484
9485# else
9486
9487 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
9488
9489# endif /* USE_RTMODEL */
9490
9491 /* Allocate memory of model methods 2 */
9492 {
9493 static struct _ssSFcnModelMethods2 methods2;
9494 ssSetModelMethods2(childS, &methods2);
9495 }
9496
9497 /* Allocate memory of model methods 3 */
9498 {
9499 static struct _ssSFcnModelMethods3 methods3;
9500 ssSetModelMethods3(childS, &methods3);
9501 }
9502
9503 /* Allocate memory for states auxilliary information */
9504 {
9505 static struct _ssStatesInfo2 statesInfo2;
9506 static ssPeriodicStatesInfo periodicStatesInfo;
9507 ssSetStatesInfo2(childS, &statesInfo2);
9508 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
9509 }
9510
9511 /* inputs */
9512 {
9513 static struct _ssPortInputs inputPortInfo[1];
9514 _ssSetNumInputPorts(childS, 1);
9515 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
9516
9517 /* port 0 */
9518 {
9519 static real32_T const *sfcnUPtrs[1];
9520 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
9521 ssGetLocalBlockIO(rts))->Sum1_lf;
9522 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
9523 _ssSetInputPortNumDimensions(childS, 0, 1);
9524 ssSetInputPortWidth(childS, 0, 1);
9525 }
9526 }
9527
9528 /* outputs */
9529 {
9530 static struct _ssPortOutputs outputPortInfo[1];
9531 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
9532 _ssSetNumOutputPorts(childS, 1);
9533
9534 /* port 0 */
9535 {
9536 _ssSetOutputPortNumDimensions(childS, 0, 1);
9537 ssSetOutputPortWidth(childS, 0, 1);
9538 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
9539 *) ssGetLocalBlockIO(rts))->GeneratedSFunction6_h));
9540 }
9541 }
9542
9543 /* path info */
9544 _ssSetModelName(childS, "Res180_sf");
9545 _ssSetPath(childS,
9546 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/PhiLControl/Generated S-Function6");
9547 if (ssGetRTModel(rts) == (NULL)) {
9548 _ssSetParentSS(childS, rts);
9549 _ssSetRootSS(childS, ssGetRootSS(rts));
9550 } else {
9551 ssSetRTModel(childS,ssGetRTModel(rts));
9552 _ssSetParentSS(childS, (NULL));
9553 _ssSetRootSS(childS, childS);
9554 }
9555
9556 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
9557
9558 /* registration */
9559 Res180_sf(childS);
9560 sfcnInitializeSizes(childS);
9561 sfcnInitializeSampleTimes(childS);
9562
9563 /* adjust sample time */
9564 ssSetSampleTime(childS, 0, 0.0);
9565 ssSetOffsetTime(childS, 0, 0.0);
9566 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
9567
9568 /* set compiled values of dynamic vector attributes */
9569 ssSetNumNonsampledZCs(childS, 0);
9570
9571 /* Update connectivity flags for each port */
9572 _ssSetInputPortConnected(childS, 0, 1);
9573 _ssSetOutputPortConnected(childS, 0, 1);
9574 _ssSetOutputPortBeingMerged(childS, 0, 0);
9575
9576 /* Update the BufferDstPort flags for each input port */
9577 _ssSetInputPortBufferDstPort(childS, 0, -1);
9578
9579 /* Instance data for generated S-Function: Res180 */
9580 {
9581 SimStruct *rts = childS;
9582
9583#include "Res180_sfcn_rtw/Res180_sid.h"
9584
9585 }
9586 }
9587
9588 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S134>/Generated S-Function1 (SaturationLimiter_sf) */
9589 {
9590 SimStruct *childS = ssGetSFunction(rts, 52);
9591
9592 /* timing info */
9593 static time_T sfcnPeriod[1];
9594 static time_T sfcnOffset[1];
9595 static int_T sfcnTsMap[1];
9596 (void) memset((void*)sfcnPeriod, 0,
9597 sizeof(time_T)*1);
9598 (void) memset((void*)sfcnOffset, 0,
9599 sizeof(time_T)*1);
9600 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
9601 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
9602 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
9603
9604 /* Set up the mdlInfo pointer */
9605# ifdef USE_RTMODEL
9606
9607 {
9608 static struct _ssBlkInfo2 _blkInfo2;
9609 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
9610 ssSetBlkInfo2Ptr(childS, blkInfo2);
9611 }
9612
9613 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
9614
9615# else
9616
9617 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
9618
9619# endif /* USE_RTMODEL */
9620
9621 /* Allocate memory of model methods 2 */
9622 {
9623 static struct _ssSFcnModelMethods2 methods2;
9624 ssSetModelMethods2(childS, &methods2);
9625 }
9626
9627 /* Allocate memory of model methods 3 */
9628 {
9629 static struct _ssSFcnModelMethods3 methods3;
9630 ssSetModelMethods3(childS, &methods3);
9631 }
9632
9633 /* Allocate memory for states auxilliary information */
9634 {
9635 static struct _ssStatesInfo2 statesInfo2;
9636 static ssPeriodicStatesInfo periodicStatesInfo;
9637 ssSetStatesInfo2(childS, &statesInfo2);
9638 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
9639 }
9640
9641 /* inputs */
9642 {
9643 static struct _ssPortInputs inputPortInfo[3];
9644 _ssSetNumInputPorts(childS, 3);
9645 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
9646
9647 /* port 0 */
9648 {
9649 static real32_T const *sfcnUPtrs[1];
9650 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
9651 ssGetLocalBlockIO(rts))->GeneratedSFunction6_h;
9652 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
9653 _ssSetInputPortNumDimensions(childS, 0, 1);
9654 ssSetInputPortWidth(childS, 0, 1);
9655 }
9656
9657 /* port 1 */
9658 {
9659 static real32_T const *sfcnUPtrs[1];
9660 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled107;
9661 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
9662 _ssSetInputPortNumDimensions(childS, 1, 1);
9663 ssSetInputPortWidth(childS, 1, 1);
9664 }
9665
9666 /* port 2 */
9667 {
9668 static real32_T const *sfcnUPtrs[1];
9669 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled119;
9670 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
9671 _ssSetInputPortNumDimensions(childS, 2, 1);
9672 ssSetInputPortWidth(childS, 2, 1);
9673 }
9674 }
9675
9676 /* outputs */
9677 {
9678 static struct _ssPortOutputs outputPortInfo[1];
9679 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
9680 _ssSetNumOutputPorts(childS, 1);
9681
9682 /* port 0 */
9683 {
9684 _ssSetOutputPortNumDimensions(childS, 0, 1);
9685 ssSetOutputPortWidth(childS, 0, 1);
9686 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
9687 *) ssGetLocalBlockIO(rts))->GeneratedSFunction1_c));
9688 }
9689 }
9690
9691 /* path info */
9692 _ssSetModelName(childS, "SaturationLimiter_sf");
9693 _ssSetPath(childS,
9694 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/PhiLControl/Saturation Limiter/Generated S-Function1");
9695 if (ssGetRTModel(rts) == (NULL)) {
9696 _ssSetParentSS(childS, rts);
9697 _ssSetRootSS(childS, ssGetRootSS(rts));
9698 } else {
9699 ssSetRTModel(childS,ssGetRTModel(rts));
9700 _ssSetParentSS(childS, (NULL));
9701 _ssSetRootSS(childS, childS);
9702 }
9703
9704 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
9705
9706 /* registration */
9707 SaturationLimiter_sf(childS);
9708 sfcnInitializeSizes(childS);
9709 sfcnInitializeSampleTimes(childS);
9710
9711 /* adjust sample time */
9712 ssSetSampleTime(childS, 0, 0.0);
9713 ssSetOffsetTime(childS, 0, 0.0);
9714 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
9715
9716 /* set compiled values of dynamic vector attributes */
9717 ssSetNumNonsampledZCs(childS, 0);
9718
9719 /* Update connectivity flags for each port */
9720 _ssSetInputPortConnected(childS, 0, 1);
9721 _ssSetInputPortConnected(childS, 1, 1);
9722 _ssSetInputPortConnected(childS, 2, 1);
9723 _ssSetOutputPortConnected(childS, 0, 1);
9724 _ssSetOutputPortBeingMerged(childS, 0, 0);
9725
9726 /* Update the BufferDstPort flags for each input port */
9727 _ssSetInputPortBufferDstPort(childS, 0, -1);
9728 _ssSetInputPortBufferDstPort(childS, 1, -1);
9729 _ssSetInputPortBufferDstPort(childS, 2, -1);
9730
9731 /* Instance data for generated S-Function: SaturationLimiter */
9732 {
9733 SimStruct *rts = childS;
9734
9735#include "SaturationLimiter_sfcn_rtw/SaturationLimiter_sid.h"
9736
9737 }
9738 }
9739
9740 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S135>/Generated S-Function (Gain_sf) */
9741 {
9742 SimStruct *childS = ssGetSFunction(rts, 53);
9743
9744 /* timing info */
9745 static time_T sfcnPeriod[1];
9746 static time_T sfcnOffset[1];
9747 static int_T sfcnTsMap[1];
9748 (void) memset((void*)sfcnPeriod, 0,
9749 sizeof(time_T)*1);
9750 (void) memset((void*)sfcnOffset, 0,
9751 sizeof(time_T)*1);
9752 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
9753 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
9754 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
9755
9756 /* Set up the mdlInfo pointer */
9757# ifdef USE_RTMODEL
9758
9759 {
9760 static struct _ssBlkInfo2 _blkInfo2;
9761 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
9762 ssSetBlkInfo2Ptr(childS, blkInfo2);
9763 }
9764
9765 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
9766
9767# else
9768
9769 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
9770
9771# endif /* USE_RTMODEL */
9772
9773 /* Allocate memory of model methods 2 */
9774 {
9775 static struct _ssSFcnModelMethods2 methods2;
9776 ssSetModelMethods2(childS, &methods2);
9777 }
9778
9779 /* Allocate memory of model methods 3 */
9780 {
9781 static struct _ssSFcnModelMethods3 methods3;
9782 ssSetModelMethods3(childS, &methods3);
9783 }
9784
9785 /* Allocate memory for states auxilliary information */
9786 {
9787 static struct _ssStatesInfo2 statesInfo2;
9788 static ssPeriodicStatesInfo periodicStatesInfo;
9789 ssSetStatesInfo2(childS, &statesInfo2);
9790 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
9791 }
9792
9793 /* inputs */
9794 {
9795 static struct _ssPortInputs inputPortInfo[2];
9796 _ssSetNumInputPorts(childS, 2);
9797 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
9798
9799 /* port 0 */
9800 {
9801 static real32_T const *sfcnUPtrs[1];
9802 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
9803 ssGetLocalBlockIO(rts))->GeneratedSFunction1_c;
9804 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
9805 _ssSetInputPortNumDimensions(childS, 0, 1);
9806 ssSetInputPortWidth(childS, 0, 1);
9807 }
9808
9809 /* port 1 */
9810 {
9811 static real32_T const *sfcnUPtrs[1];
9812 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled108;
9813 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
9814 _ssSetInputPortNumDimensions(childS, 1, 1);
9815 ssSetInputPortWidth(childS, 1, 1);
9816 }
9817 }
9818
9819 /* outputs */
9820 {
9821 static struct _ssPortOutputs outputPortInfo[1];
9822 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
9823 _ssSetNumOutputPorts(childS, 1);
9824
9825 /* port 0 */
9826 {
9827 _ssSetOutputPortNumDimensions(childS, 0, 1);
9828 ssSetOutputPortWidth(childS, 0, 1);
9829 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
9830 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_hw));
9831 }
9832 }
9833
9834 /* path info */
9835 _ssSetModelName(childS, "Gain_sf");
9836 _ssSetPath(childS,
9837 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/PhiLControl/gain/Generated S-Function");
9838 if (ssGetRTModel(rts) == (NULL)) {
9839 _ssSetParentSS(childS, rts);
9840 _ssSetRootSS(childS, ssGetRootSS(rts));
9841 } else {
9842 ssSetRTModel(childS,ssGetRTModel(rts));
9843 _ssSetParentSS(childS, (NULL));
9844 _ssSetRootSS(childS, childS);
9845 }
9846
9847 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
9848
9849 /* registration */
9850 Gain_sf(childS);
9851 sfcnInitializeSizes(childS);
9852 sfcnInitializeSampleTimes(childS);
9853
9854 /* adjust sample time */
9855 ssSetSampleTime(childS, 0, 0.0);
9856 ssSetOffsetTime(childS, 0, 0.0);
9857 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
9858
9859 /* set compiled values of dynamic vector attributes */
9860 ssSetNumNonsampledZCs(childS, 0);
9861
9862 /* Update connectivity flags for each port */
9863 _ssSetInputPortConnected(childS, 0, 1);
9864 _ssSetInputPortConnected(childS, 1, 1);
9865 _ssSetOutputPortConnected(childS, 0, 1);
9866 _ssSetOutputPortBeingMerged(childS, 0, 0);
9867
9868 /* Update the BufferDstPort flags for each input port */
9869 _ssSetInputPortBufferDstPort(childS, 0, -1);
9870 _ssSetInputPortBufferDstPort(childS, 1, -1);
9871
9872 /* Instance data for generated S-Function: Gain */
9873 {
9874 SimStruct *rts = childS;
9875
9876#include "Gain_sfcn_rtw/Gain_sid.h"
9877
9878 }
9879 }
9880
9881 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S136>/Generated S-Function (Gain_sf) */
9882 {
9883 SimStruct *childS = ssGetSFunction(rts, 54);
9884
9885 /* timing info */
9886 static time_T sfcnPeriod[1];
9887 static time_T sfcnOffset[1];
9888 static int_T sfcnTsMap[1];
9889 (void) memset((void*)sfcnPeriod, 0,
9890 sizeof(time_T)*1);
9891 (void) memset((void*)sfcnOffset, 0,
9892 sizeof(time_T)*1);
9893 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
9894 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
9895 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
9896
9897 /* Set up the mdlInfo pointer */
9898# ifdef USE_RTMODEL
9899
9900 {
9901 static struct _ssBlkInfo2 _blkInfo2;
9902 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
9903 ssSetBlkInfo2Ptr(childS, blkInfo2);
9904 }
9905
9906 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
9907
9908# else
9909
9910 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
9911
9912# endif /* USE_RTMODEL */
9913
9914 /* Allocate memory of model methods 2 */
9915 {
9916 static struct _ssSFcnModelMethods2 methods2;
9917 ssSetModelMethods2(childS, &methods2);
9918 }
9919
9920 /* Allocate memory of model methods 3 */
9921 {
9922 static struct _ssSFcnModelMethods3 methods3;
9923 ssSetModelMethods3(childS, &methods3);
9924 }
9925
9926 /* Allocate memory for states auxilliary information */
9927 {
9928 static struct _ssStatesInfo2 statesInfo2;
9929 static ssPeriodicStatesInfo periodicStatesInfo;
9930 ssSetStatesInfo2(childS, &statesInfo2);
9931 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
9932 }
9933
9934 /* inputs */
9935 {
9936 static struct _ssPortInputs inputPortInfo[2];
9937 _ssSetNumInputPorts(childS, 2);
9938 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
9939
9940 /* port 0 */
9941 {
9942 static real32_T const *sfcnUPtrs[1];
9943 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
9944 ssGetLocalBlockIO(rts))->GeneratedSFunction_hw;
9945 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
9946 _ssSetInputPortNumDimensions(childS, 0, 1);
9947 ssSetInputPortWidth(childS, 0, 1);
9948 }
9949
9950 /* port 1 */
9951 {
9952 static real32_T const *sfcnUPtrs[1];
9953 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled116;
9954 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
9955 _ssSetInputPortNumDimensions(childS, 1, 1);
9956 ssSetInputPortWidth(childS, 1, 1);
9957 }
9958 }
9959
9960 /* outputs */
9961 {
9962 static struct _ssPortOutputs outputPortInfo[1];
9963 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
9964 _ssSetNumOutputPorts(childS, 1);
9965
9966 /* port 0 */
9967 {
9968 _ssSetOutputPortNumDimensions(childS, 0, 1);
9969 ssSetOutputPortWidth(childS, 0, 1);
9970 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
9971 *) ssGetLocalBlockIO(rts))->MinMax));
9972 }
9973 }
9974
9975 /* path info */
9976 _ssSetModelName(childS, "Gain_sf");
9977 _ssSetPath(childS,
9978 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/PhiLControl/gain1/Generated S-Function");
9979 if (ssGetRTModel(rts) == (NULL)) {
9980 _ssSetParentSS(childS, rts);
9981 _ssSetRootSS(childS, ssGetRootSS(rts));
9982 } else {
9983 ssSetRTModel(childS,ssGetRTModel(rts));
9984 _ssSetParentSS(childS, (NULL));
9985 _ssSetRootSS(childS, childS);
9986 }
9987
9988 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
9989
9990 /* registration */
9991 Gain_sf(childS);
9992 sfcnInitializeSizes(childS);
9993 sfcnInitializeSampleTimes(childS);
9994
9995 /* adjust sample time */
9996 ssSetSampleTime(childS, 0, 0.0);
9997 ssSetOffsetTime(childS, 0, 0.0);
9998 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
9999
10000 /* set compiled values of dynamic vector attributes */
10001 ssSetNumNonsampledZCs(childS, 0);
10002
10003 /* Update connectivity flags for each port */
10004 _ssSetInputPortConnected(childS, 0, 1);
10005 _ssSetInputPortConnected(childS, 1, 1);
10006 _ssSetOutputPortConnected(childS, 0, 1);
10007 _ssSetOutputPortBeingMerged(childS, 0, 0);
10008
10009 /* Update the BufferDstPort flags for each input port */
10010 _ssSetInputPortBufferDstPort(childS, 0, -1);
10011 _ssSetInputPortBufferDstPort(childS, 1, -1);
10012
10013 /* Instance data for generated S-Function: Gain */
10014 {
10015 SimStruct *rts = childS;
10016
10017#include "Gain_sfcn_rtw/Gain_sid.h"
10018
10019 }
10020 }
10021
10022 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S137>/Generated S-Function (Gain_sf) */
10023 {
10024 SimStruct *childS = ssGetSFunction(rts, 55);
10025
10026 /* timing info */
10027 static time_T sfcnPeriod[1];
10028 static time_T sfcnOffset[1];
10029 static int_T sfcnTsMap[1];
10030 (void) memset((void*)sfcnPeriod, 0,
10031 sizeof(time_T)*1);
10032 (void) memset((void*)sfcnOffset, 0,
10033 sizeof(time_T)*1);
10034 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
10035 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
10036 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
10037
10038 /* Set up the mdlInfo pointer */
10039# ifdef USE_RTMODEL
10040
10041 {
10042 static struct _ssBlkInfo2 _blkInfo2;
10043 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
10044 ssSetBlkInfo2Ptr(childS, blkInfo2);
10045 }
10046
10047 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
10048
10049# else
10050
10051 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
10052
10053# endif /* USE_RTMODEL */
10054
10055 /* Allocate memory of model methods 2 */
10056 {
10057 static struct _ssSFcnModelMethods2 methods2;
10058 ssSetModelMethods2(childS, &methods2);
10059 }
10060
10061 /* Allocate memory of model methods 3 */
10062 {
10063 static struct _ssSFcnModelMethods3 methods3;
10064 ssSetModelMethods3(childS, &methods3);
10065 }
10066
10067 /* Allocate memory for states auxilliary information */
10068 {
10069 static struct _ssStatesInfo2 statesInfo2;
10070 static ssPeriodicStatesInfo periodicStatesInfo;
10071 ssSetStatesInfo2(childS, &statesInfo2);
10072 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
10073 }
10074
10075 /* inputs */
10076 {
10077 static struct _ssPortInputs inputPortInfo[2];
10078 _ssSetNumInputPorts(childS, 2);
10079 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
10080
10081 /* port 0 */
10082 {
10083 static real32_T const *sfcnUPtrs[1];
10084 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
10085 ssGetLocalBlockIO(rts))->UnitDelay1_k;
10086 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
10087 _ssSetInputPortNumDimensions(childS, 0, 1);
10088 ssSetInputPortWidth(childS, 0, 1);
10089 }
10090
10091 /* port 1 */
10092 {
10093 static real32_T const *sfcnUPtrs[1];
10094 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled109;
10095 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
10096 _ssSetInputPortNumDimensions(childS, 1, 1);
10097 ssSetInputPortWidth(childS, 1, 1);
10098 }
10099 }
10100
10101 /* outputs */
10102 {
10103 static struct _ssPortOutputs outputPortInfo[1];
10104 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
10105 _ssSetNumOutputPorts(childS, 1);
10106
10107 /* port 0 */
10108 {
10109 _ssSetOutputPortNumDimensions(childS, 0, 1);
10110 ssSetOutputPortWidth(childS, 0, 1);
10111 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
10112 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_a));
10113 }
10114 }
10115
10116 /* path info */
10117 _ssSetModelName(childS, "Gain_sf");
10118 _ssSetPath(childS,
10119 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/PhiLControl/gain8/Generated S-Function");
10120 if (ssGetRTModel(rts) == (NULL)) {
10121 _ssSetParentSS(childS, rts);
10122 _ssSetRootSS(childS, ssGetRootSS(rts));
10123 } else {
10124 ssSetRTModel(childS,ssGetRTModel(rts));
10125 _ssSetParentSS(childS, (NULL));
10126 _ssSetRootSS(childS, childS);
10127 }
10128
10129 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
10130
10131 /* registration */
10132 Gain_sf(childS);
10133 sfcnInitializeSizes(childS);
10134 sfcnInitializeSampleTimes(childS);
10135
10136 /* adjust sample time */
10137 ssSetSampleTime(childS, 0, 0.005);
10138 ssSetOffsetTime(childS, 0, 0.0);
10139 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[1];
10140
10141 /* set compiled values of dynamic vector attributes */
10142 ssSetNumNonsampledZCs(childS, 0);
10143
10144 /* Update connectivity flags for each port */
10145 _ssSetInputPortConnected(childS, 0, 1);
10146 _ssSetInputPortConnected(childS, 1, 1);
10147 _ssSetOutputPortConnected(childS, 0, 1);
10148 _ssSetOutputPortBeingMerged(childS, 0, 0);
10149
10150 /* Update the BufferDstPort flags for each input port */
10151 _ssSetInputPortBufferDstPort(childS, 0, -1);
10152 _ssSetInputPortBufferDstPort(childS, 1, -1);
10153
10154 /* Instance data for generated S-Function: Gain */
10155 {
10156 SimStruct *rts = childS;
10157
10158#include "Gain_sfcn_rtw/Gain_sid.h"
10159
10160 }
10161 }
10162
10163 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S132>/Generated S-Function3 (IntegratorLimited_sf) */
10164 {
10165 SimStruct *childS = ssGetSFunction(rts, 56);
10166
10167 /* timing info */
10168 static time_T sfcnPeriod[1];
10169 static time_T sfcnOffset[1];
10170 static int_T sfcnTsMap[1];
10171 (void) memset((void*)sfcnPeriod, 0,
10172 sizeof(time_T)*1);
10173 (void) memset((void*)sfcnOffset, 0,
10174 sizeof(time_T)*1);
10175 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
10176 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
10177 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
10178
10179 /* Set up the mdlInfo pointer */
10180# ifdef USE_RTMODEL
10181
10182 {
10183 static struct _ssBlkInfo2 _blkInfo2;
10184 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
10185 ssSetBlkInfo2Ptr(childS, blkInfo2);
10186 }
10187
10188 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
10189
10190# else
10191
10192 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
10193
10194# endif /* USE_RTMODEL */
10195
10196 /* Allocate memory of model methods 2 */
10197 {
10198 static struct _ssSFcnModelMethods2 methods2;
10199 ssSetModelMethods2(childS, &methods2);
10200 }
10201
10202 /* Allocate memory of model methods 3 */
10203 {
10204 static struct _ssSFcnModelMethods3 methods3;
10205 ssSetModelMethods3(childS, &methods3);
10206 }
10207
10208 /* Allocate memory for states auxilliary information */
10209 {
10210 static struct _ssStatesInfo2 statesInfo2;
10211 static ssPeriodicStatesInfo periodicStatesInfo;
10212 ssSetStatesInfo2(childS, &statesInfo2);
10213 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
10214 }
10215
10216 /* inputs */
10217 {
10218 static struct _ssPortInputs inputPortInfo[7];
10219 _ssSetNumInputPorts(childS, 7);
10220 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
10221
10222 /* port 0 */
10223 {
10224 static real32_T const *sfcnUPtrs[1];
10225 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
10226 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReuseS;
10227 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
10228 _ssSetInputPortNumDimensions(childS, 0, 1);
10229 ssSetInputPortWidth(childS, 0, 1);
10230 }
10231
10232 /* port 1 */
10233 {
10234 static int8_T const *sfcnUPtrs[1];
10235 sfcnUPtrs[0] = (int8_T const *) &((B_AFCS_MODEL1_T *)
10236 ssGetLocalBlockIO(rts))->DataTypeConversion3_d;
10237 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
10238 _ssSetInputPortNumDimensions(childS, 1, 1);
10239 ssSetInputPortWidth(childS, 1, 1);
10240 }
10241
10242 /* port 2 */
10243 {
10244 static real32_T const *sfcnUPtrs[1];
10245 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
10246 ssGetLocalBlockIO(rts))->Sum2_c;
10247 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
10248 _ssSetInputPortNumDimensions(childS, 2, 1);
10249 ssSetInputPortWidth(childS, 2, 1);
10250 }
10251
10252 /* port 3 */
10253 {
10254 static real32_T const *sfcnUPtrs[1];
10255 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
10256 ssGetLocalBlockIO(rts))->Sum2_c;
10257 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
10258 _ssSetInputPortNumDimensions(childS, 3, 1);
10259 ssSetInputPortWidth(childS, 3, 1);
10260 }
10261
10262 /* port 4 */
10263 {
10264 static real32_T const *sfcnUPtrs[1];
10265 sfcnUPtrs[0] = (real32_T const *)
10266 &AFCS_MODEL1_ConstP.Constant29_Value;
10267 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
10268 _ssSetInputPortNumDimensions(childS, 4, 1);
10269 ssSetInputPortWidth(childS, 4, 1);
10270 }
10271
10272 /* port 5 */
10273 {
10274 static real32_T const *sfcnUPtrs[1];
10275 sfcnUPtrs[0] = (real32_T const *)
10276 &AFCS_MODEL1_ConstP.Constant30_Value;
10277 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
10278 _ssSetInputPortNumDimensions(childS, 5, 1);
10279 ssSetInputPortWidth(childS, 5, 1);
10280 }
10281
10282 /* port 6 */
10283 {
10284 static real32_T const *sfcnUPtrs[1];
10285 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
10286 ssGetLocalBlockIO(rts))->Sum11;
10287 _ssSetInputPortSignalPtrs(childS, 6, (InputPtrsType)&sfcnUPtrs[0]);
10288 _ssSetInputPortNumDimensions(childS, 6, 1);
10289 ssSetInputPortWidth(childS, 6, 1);
10290 }
10291 }
10292
10293 /* outputs */
10294 {
10295 static struct _ssPortOutputs outputPortInfo[1];
10296 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
10297 _ssSetNumOutputPorts(childS, 1);
10298
10299 /* port 0 */
10300 {
10301 _ssSetOutputPortNumDimensions(childS, 0, 1);
10302 ssSetOutputPortWidth(childS, 0, 1);
10303 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
10304 *) ssGetLocalBlockIO(rts))->GeneratedSFunction3));
10305 }
10306 }
10307
10308 /* path info */
10309 _ssSetModelName(childS, "IntegratorLimited_sf");
10310 _ssSetPath(childS,
10311 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/PhiLControl/Integrator Limited/Generated S-Function3");
10312 if (ssGetRTModel(rts) == (NULL)) {
10313 _ssSetParentSS(childS, rts);
10314 _ssSetRootSS(childS, ssGetRootSS(rts));
10315 } else {
10316 ssSetRTModel(childS,ssGetRTModel(rts));
10317 _ssSetParentSS(childS, (NULL));
10318 _ssSetRootSS(childS, childS);
10319 }
10320
10321 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
10322
10323 /* work vectors */
10324 {
10325 static struct _ssDWorkRecord dWorkRecord[4];
10326 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
10327 ssSetSFcnDWork(childS, dWorkRecord);
10328 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
10329 _ssSetNumDWork(childS, 4);
10330
10331 /* DWORK0 */
10332 ssSetDWorkWidth(childS, 0, 1);
10333 ssSetDWorkDataType(childS, 0,SS_SINGLE);
10334 ssSetDWorkComplexSignal(childS, 0, 0);
10335 ssSetDWorkUsedAsDState(childS, 0, 1);
10336 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 192))[0]);
10337
10338 /* DWORK1 */
10339 ssSetDWorkWidth(childS, 1, 1);
10340 ssSetDWorkDataType(childS, 1,SS_SINGLE);
10341 ssSetDWorkComplexSignal(childS, 1, 0);
10342 ssSetDWorkUsedAsDState(childS, 1, 1);
10343 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 193))[0]);
10344
10345 /* DWORK2 */
10346 ssSetDWorkWidth(childS, 2, 1);
10347 ssSetDWorkDataType(childS, 2,SS_INT8);
10348 ssSetDWorkComplexSignal(childS, 2, 0);
10349 ssSetDWorkUsedAsDState(childS, 2, 1);
10350 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 419))[0]);
10351
10352 /* DWORK3 */
10353 ssSetDWorkWidth(childS, 3, 1);
10354 ssSetDWorkDataType(childS, 3,SS_INT8);
10355 ssSetDWorkComplexSignal(childS, 3, 0);
10356 ssSetDWorkUsedAsDState(childS, 3, 1);
10357 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 420))[0]);
10358 }
10359
10360 /* registration */
10361 IntegratorLimited_sf(childS);
10362 sfcnInitializeSizes(childS);
10363 sfcnInitializeSampleTimes(childS);
10364
10365 /* adjust sample time */
10366 ssSetSampleTime(childS, 0, 0.0);
10367 ssSetOffsetTime(childS, 0, 0.0);
10368 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
10369
10370 /* set compiled values of dynamic vector attributes */
10371 ssSetNumNonsampledZCs(childS, 0);
10372
10373 /* Update connectivity flags for each port */
10374 _ssSetInputPortConnected(childS, 0, 1);
10375 _ssSetInputPortConnected(childS, 1, 1);
10376 _ssSetInputPortConnected(childS, 2, 1);
10377 _ssSetInputPortConnected(childS, 3, 1);
10378 _ssSetInputPortConnected(childS, 4, 1);
10379 _ssSetInputPortConnected(childS, 5, 1);
10380 _ssSetInputPortConnected(childS, 6, 1);
10381 _ssSetOutputPortConnected(childS, 0, 1);
10382 _ssSetOutputPortBeingMerged(childS, 0, 0);
10383
10384 /* Update the BufferDstPort flags for each input port */
10385 _ssSetInputPortBufferDstPort(childS, 0, -1);
10386 _ssSetInputPortBufferDstPort(childS, 1, -1);
10387 _ssSetInputPortBufferDstPort(childS, 2, -1);
10388 _ssSetInputPortBufferDstPort(childS, 3, -1);
10389 _ssSetInputPortBufferDstPort(childS, 4, -1);
10390 _ssSetInputPortBufferDstPort(childS, 5, -1);
10391 _ssSetInputPortBufferDstPort(childS, 6, -1);
10392
10393 /* Instance data for generated S-Function: IntegratorLimited */
10394 {
10395 SimStruct *rts = childS;
10396
10397#include "IntegratorLimited_sfcn_rtw/IntegratorLimited_sid.h"
10398
10399 }
10400 }
10401
10402 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S133>/Generated S-Function2 (LeadLagFilter_sf) */
10403 {
10404 SimStruct *childS = ssGetSFunction(rts, 57);
10405
10406 /* timing info */
10407 static time_T sfcnPeriod[1];
10408 static time_T sfcnOffset[1];
10409 static int_T sfcnTsMap[1];
10410 (void) memset((void*)sfcnPeriod, 0,
10411 sizeof(time_T)*1);
10412 (void) memset((void*)sfcnOffset, 0,
10413 sizeof(time_T)*1);
10414 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
10415 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
10416 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
10417
10418 /* Set up the mdlInfo pointer */
10419# ifdef USE_RTMODEL
10420
10421 {
10422 static struct _ssBlkInfo2 _blkInfo2;
10423 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
10424 ssSetBlkInfo2Ptr(childS, blkInfo2);
10425 }
10426
10427 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
10428
10429# else
10430
10431 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
10432
10433# endif /* USE_RTMODEL */
10434
10435 /* Allocate memory of model methods 2 */
10436 {
10437 static struct _ssSFcnModelMethods2 methods2;
10438 ssSetModelMethods2(childS, &methods2);
10439 }
10440
10441 /* Allocate memory of model methods 3 */
10442 {
10443 static struct _ssSFcnModelMethods3 methods3;
10444 ssSetModelMethods3(childS, &methods3);
10445 }
10446
10447 /* Allocate memory for states auxilliary information */
10448 {
10449 static struct _ssStatesInfo2 statesInfo2;
10450 static ssPeriodicStatesInfo periodicStatesInfo;
10451 ssSetStatesInfo2(childS, &statesInfo2);
10452 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
10453 }
10454
10455 /* inputs */
10456 {
10457 static struct _ssPortInputs inputPortInfo[7];
10458 _ssSetNumInputPorts(childS, 7);
10459 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
10460
10461 /* port 0 */
10462 {
10463 static real32_T const *sfcnUPtrs[1];
10464 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
10465 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReuseS;
10466 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
10467 _ssSetInputPortNumDimensions(childS, 0, 1);
10468 ssSetInputPortWidth(childS, 0, 1);
10469 }
10470
10471 /* port 1 */
10472 {
10473 static int8_T const *sfcnUPtrs[1];
10474 sfcnUPtrs[0] = (int8_T const *) &((B_AFCS_MODEL1_T *)
10475 ssGetLocalBlockIO(rts))->DataTypeConversion3_d;
10476 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
10477 _ssSetInputPortNumDimensions(childS, 1, 1);
10478 ssSetInputPortWidth(childS, 1, 1);
10479 }
10480
10481 /* port 2 */
10482 {
10483 static real32_T const *sfcnUPtrs[1];
10484 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled108;
10485 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
10486 _ssSetInputPortNumDimensions(childS, 2, 1);
10487 ssSetInputPortWidth(childS, 2, 1);
10488 }
10489
10490 /* port 3 */
10491 {
10492 static real32_T const *sfcnUPtrs[1];
10493 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled108;
10494 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
10495 _ssSetInputPortNumDimensions(childS, 3, 1);
10496 ssSetInputPortWidth(childS, 3, 1);
10497 }
10498
10499 /* port 4 */
10500 {
10501 static real32_T const *sfcnUPtrs[1];
10502 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
10503 ssGetLocalBlockIO(rts))->Switch_bg;
10504 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
10505 _ssSetInputPortNumDimensions(childS, 4, 1);
10506 ssSetInputPortWidth(childS, 4, 1);
10507 }
10508
10509 /* port 5 */
10510 {
10511 static real32_T const *sfcnUPtrs[1];
10512 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
10513 ssGetLocalBlockIO(rts))->Switch_bg;
10514 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
10515 _ssSetInputPortNumDimensions(childS, 5, 1);
10516 ssSetInputPortWidth(childS, 5, 1);
10517 }
10518
10519 /* port 6 */
10520 {
10521 static real32_T const *sfcnUPtrs[1];
10522 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
10523 ssGetLocalBlockIO(rts))->Sum_c;
10524 _ssSetInputPortSignalPtrs(childS, 6, (InputPtrsType)&sfcnUPtrs[0]);
10525 _ssSetInputPortNumDimensions(childS, 6, 1);
10526 ssSetInputPortWidth(childS, 6, 1);
10527 }
10528 }
10529
10530 /* outputs */
10531 {
10532 static struct _ssPortOutputs outputPortInfo[1];
10533 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
10534 _ssSetNumOutputPorts(childS, 1);
10535
10536 /* port 0 */
10537 {
10538 _ssSetOutputPortNumDimensions(childS, 0, 1);
10539 ssSetOutputPortWidth(childS, 0, 1);
10540 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
10541 *) ssGetLocalBlockIO(rts))->GeneratedSFunction2_f));
10542 }
10543 }
10544
10545 /* path info */
10546 _ssSetModelName(childS, "LeadLagFilter_sf");
10547 _ssSetPath(childS,
10548 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/PhiLControl/Lead lag/Generated S-Function2");
10549 if (ssGetRTModel(rts) == (NULL)) {
10550 _ssSetParentSS(childS, rts);
10551 _ssSetRootSS(childS, ssGetRootSS(rts));
10552 } else {
10553 ssSetRTModel(childS,ssGetRTModel(rts));
10554 _ssSetParentSS(childS, (NULL));
10555 _ssSetRootSS(childS, childS);
10556 }
10557
10558 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
10559
10560 /* work vectors */
10561 {
10562 static struct _ssDWorkRecord dWorkRecord[4];
10563 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
10564 ssSetSFcnDWork(childS, dWorkRecord);
10565 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
10566 _ssSetNumDWork(childS, 4);
10567
10568 /* DWORK0 */
10569 ssSetDWorkWidth(childS, 0, 1);
10570 ssSetDWorkDataType(childS, 0,SS_SINGLE);
10571 ssSetDWorkComplexSignal(childS, 0, 0);
10572 ssSetDWorkUsedAsDState(childS, 0, 1);
10573 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 194))[0]);
10574
10575 /* DWORK1 */
10576 ssSetDWorkWidth(childS, 1, 1);
10577 ssSetDWorkDataType(childS, 1,SS_SINGLE);
10578 ssSetDWorkComplexSignal(childS, 1, 0);
10579 ssSetDWorkUsedAsDState(childS, 1, 1);
10580 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 195))[0]);
10581
10582 /* DWORK2 */
10583 ssSetDWorkWidth(childS, 2, 1);
10584 ssSetDWorkDataType(childS, 2,SS_INT8);
10585 ssSetDWorkComplexSignal(childS, 2, 0);
10586 ssSetDWorkUsedAsDState(childS, 2, 1);
10587 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 421))[0]);
10588
10589 /* DWORK3 */
10590 ssSetDWorkWidth(childS, 3, 1);
10591 ssSetDWorkDataType(childS, 3,SS_INT8);
10592 ssSetDWorkComplexSignal(childS, 3, 0);
10593 ssSetDWorkUsedAsDState(childS, 3, 1);
10594 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 422))[0]);
10595 }
10596
10597 /* registration */
10598 LeadLagFilter_sf(childS);
10599 sfcnInitializeSizes(childS);
10600 sfcnInitializeSampleTimes(childS);
10601
10602 /* adjust sample time */
10603 ssSetSampleTime(childS, 0, 0.0);
10604 ssSetOffsetTime(childS, 0, 0.0);
10605 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
10606
10607 /* set compiled values of dynamic vector attributes */
10608 ssSetNumNonsampledZCs(childS, 0);
10609
10610 /* Update connectivity flags for each port */
10611 _ssSetInputPortConnected(childS, 0, 1);
10612 _ssSetInputPortConnected(childS, 1, 1);
10613 _ssSetInputPortConnected(childS, 2, 1);
10614 _ssSetInputPortConnected(childS, 3, 1);
10615 _ssSetInputPortConnected(childS, 4, 1);
10616 _ssSetInputPortConnected(childS, 5, 1);
10617 _ssSetInputPortConnected(childS, 6, 1);
10618 _ssSetOutputPortConnected(childS, 0, 1);
10619 _ssSetOutputPortBeingMerged(childS, 0, 0);
10620
10621 /* Update the BufferDstPort flags for each input port */
10622 _ssSetInputPortBufferDstPort(childS, 0, -1);
10623 _ssSetInputPortBufferDstPort(childS, 1, -1);
10624 _ssSetInputPortBufferDstPort(childS, 2, -1);
10625 _ssSetInputPortBufferDstPort(childS, 3, -1);
10626 _ssSetInputPortBufferDstPort(childS, 4, -1);
10627 _ssSetInputPortBufferDstPort(childS, 5, -1);
10628 _ssSetInputPortBufferDstPort(childS, 6, -1);
10629
10630 /* Instance data for generated S-Function: LeadLagFilter */
10631 {
10632 SimStruct *rts = childS;
10633
10634#include "LeadLagFilter_sfcn_rtw/LeadLagFilter_sid.h"
10635
10636 }
10637 }
10638
10639 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S131>/Generated S-Function4 (LagFilter_sf) */
10640 {
10641 SimStruct *childS = ssGetSFunction(rts, 58);
10642
10643 /* timing info */
10644 static time_T sfcnPeriod[1];
10645 static time_T sfcnOffset[1];
10646 static int_T sfcnTsMap[1];
10647 (void) memset((void*)sfcnPeriod, 0,
10648 sizeof(time_T)*1);
10649 (void) memset((void*)sfcnOffset, 0,
10650 sizeof(time_T)*1);
10651 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
10652 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
10653 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
10654
10655 /* Set up the mdlInfo pointer */
10656# ifdef USE_RTMODEL
10657
10658 {
10659 static struct _ssBlkInfo2 _blkInfo2;
10660 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
10661 ssSetBlkInfo2Ptr(childS, blkInfo2);
10662 }
10663
10664 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
10665
10666# else
10667
10668 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
10669
10670# endif /* USE_RTMODEL */
10671
10672 /* Allocate memory of model methods 2 */
10673 {
10674 static struct _ssSFcnModelMethods2 methods2;
10675 ssSetModelMethods2(childS, &methods2);
10676 }
10677
10678 /* Allocate memory of model methods 3 */
10679 {
10680 static struct _ssSFcnModelMethods3 methods3;
10681 ssSetModelMethods3(childS, &methods3);
10682 }
10683
10684 /* Allocate memory for states auxilliary information */
10685 {
10686 static struct _ssStatesInfo2 statesInfo2;
10687 static ssPeriodicStatesInfo periodicStatesInfo;
10688 ssSetStatesInfo2(childS, &statesInfo2);
10689 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
10690 }
10691
10692 /* inputs */
10693 {
10694 static struct _ssPortInputs inputPortInfo[6];
10695 _ssSetNumInputPorts(childS, 6);
10696 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
10697
10698 /* port 0 */
10699 {
10700 static real32_T const *sfcnUPtrs[1];
10701 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
10702 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReuseS;
10703 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
10704 _ssSetInputPortNumDimensions(childS, 0, 1);
10705 ssSetInputPortWidth(childS, 0, 1);
10706 }
10707
10708 /* port 1 */
10709 {
10710 static int8_T const *sfcnUPtrs[1];
10711 sfcnUPtrs[0] = (int8_T const *) &((B_AFCS_MODEL1_T *)
10712 ssGetLocalBlockIO(rts))->DataTypeConversion3_d;
10713 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
10714 _ssSetInputPortNumDimensions(childS, 1, 1);
10715 ssSetInputPortWidth(childS, 1, 1);
10716 }
10717
10718 /* port 2 */
10719 {
10720 static real32_T const *sfcnUPtrs[1];
10721 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled107;
10722 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
10723 _ssSetInputPortNumDimensions(childS, 2, 1);
10724 ssSetInputPortWidth(childS, 2, 1);
10725 }
10726
10727 /* port 3 */
10728 {
10729 static real32_T const *sfcnUPtrs[1];
10730 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
10731 ssGetLocalBlockIO(rts))->Switch_bg;
10732 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
10733 _ssSetInputPortNumDimensions(childS, 3, 1);
10734 ssSetInputPortWidth(childS, 3, 1);
10735 }
10736
10737 /* port 4 */
10738 {
10739 static real32_T const *sfcnUPtrs[1];
10740 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
10741 ssGetLocalBlockIO(rts))->Switch_bg;
10742 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
10743 _ssSetInputPortNumDimensions(childS, 4, 1);
10744 ssSetInputPortWidth(childS, 4, 1);
10745 }
10746
10747 /* port 5 */
10748 {
10749 static real32_T const *sfcnUPtrs[1];
10750 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
10751 ssGetLocalBlockIO(rts))->GeneratedSFunction2_f;
10752 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
10753 _ssSetInputPortNumDimensions(childS, 5, 1);
10754 ssSetInputPortWidth(childS, 5, 1);
10755 }
10756 }
10757
10758 /* outputs */
10759 {
10760 static struct _ssPortOutputs outputPortInfo[1];
10761 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
10762 _ssSetNumOutputPorts(childS, 1);
10763
10764 /* port 0 */
10765 {
10766 _ssSetOutputPortNumDimensions(childS, 0, 1);
10767 ssSetOutputPortWidth(childS, 0, 1);
10768 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
10769 *) ssGetLocalBlockIO(rts))->GeneratedSFunction4_m));
10770 }
10771 }
10772
10773 /* path info */
10774 _ssSetModelName(childS, "LagFilter_sf");
10775 _ssSetPath(childS,
10776 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/PhiLControl/ lag filter/Generated S-Function4");
10777 if (ssGetRTModel(rts) == (NULL)) {
10778 _ssSetParentSS(childS, rts);
10779 _ssSetRootSS(childS, ssGetRootSS(rts));
10780 } else {
10781 ssSetRTModel(childS,ssGetRTModel(rts));
10782 _ssSetParentSS(childS, (NULL));
10783 _ssSetRootSS(childS, childS);
10784 }
10785
10786 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
10787
10788 /* work vectors */
10789 {
10790 static struct _ssDWorkRecord dWorkRecord[4];
10791 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
10792 ssSetSFcnDWork(childS, dWorkRecord);
10793 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
10794 _ssSetNumDWork(childS, 4);
10795
10796 /* DWORK0 */
10797 ssSetDWorkWidth(childS, 0, 1);
10798 ssSetDWorkDataType(childS, 0,SS_SINGLE);
10799 ssSetDWorkComplexSignal(childS, 0, 0);
10800 ssSetDWorkUsedAsDState(childS, 0, 1);
10801 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 196))[0]);
10802
10803 /* DWORK1 */
10804 ssSetDWorkWidth(childS, 1, 1);
10805 ssSetDWorkDataType(childS, 1,SS_SINGLE);
10806 ssSetDWorkComplexSignal(childS, 1, 0);
10807 ssSetDWorkUsedAsDState(childS, 1, 1);
10808 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 197))[0]);
10809
10810 /* DWORK2 */
10811 ssSetDWorkWidth(childS, 2, 1);
10812 ssSetDWorkDataType(childS, 2,SS_INT8);
10813 ssSetDWorkComplexSignal(childS, 2, 0);
10814 ssSetDWorkUsedAsDState(childS, 2, 1);
10815 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 423))[0]);
10816
10817 /* DWORK3 */
10818 ssSetDWorkWidth(childS, 3, 1);
10819 ssSetDWorkDataType(childS, 3,SS_INT8);
10820 ssSetDWorkComplexSignal(childS, 3, 0);
10821 ssSetDWorkUsedAsDState(childS, 3, 1);
10822 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 424))[0]);
10823 }
10824
10825 /* registration */
10826 LagFilter_sf(childS);
10827 sfcnInitializeSizes(childS);
10828 sfcnInitializeSampleTimes(childS);
10829
10830 /* adjust sample time */
10831 ssSetSampleTime(childS, 0, 0.0);
10832 ssSetOffsetTime(childS, 0, 0.0);
10833 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
10834
10835 /* set compiled values of dynamic vector attributes */
10836 ssSetNumNonsampledZCs(childS, 0);
10837
10838 /* Update connectivity flags for each port */
10839 _ssSetInputPortConnected(childS, 0, 1);
10840 _ssSetInputPortConnected(childS, 1, 1);
10841 _ssSetInputPortConnected(childS, 2, 1);
10842 _ssSetInputPortConnected(childS, 3, 1);
10843 _ssSetInputPortConnected(childS, 4, 1);
10844 _ssSetInputPortConnected(childS, 5, 1);
10845 _ssSetOutputPortConnected(childS, 0, 1);
10846 _ssSetOutputPortBeingMerged(childS, 0, 0);
10847
10848 /* Update the BufferDstPort flags for each input port */
10849 _ssSetInputPortBufferDstPort(childS, 0, -1);
10850 _ssSetInputPortBufferDstPort(childS, 1, -1);
10851 _ssSetInputPortBufferDstPort(childS, 2, -1);
10852 _ssSetInputPortBufferDstPort(childS, 3, -1);
10853 _ssSetInputPortBufferDstPort(childS, 4, -1);
10854 _ssSetInputPortBufferDstPort(childS, 5, -1);
10855
10856 /* Instance data for generated S-Function: LagFilter */
10857 {
10858 SimStruct *rts = childS;
10859
10860#include "LagFilter_sfcn_rtw/LagFilter_sid.h"
10861
10862 }
10863 }
10864
10865 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S155>/Generated S-Function1 (SaturationLimiter_sf) */
10866 {
10867 SimStruct *childS = ssGetSFunction(rts, 59);
10868
10869 /* timing info */
10870 static time_T sfcnPeriod[1];
10871 static time_T sfcnOffset[1];
10872 static int_T sfcnTsMap[1];
10873 (void) memset((void*)sfcnPeriod, 0,
10874 sizeof(time_T)*1);
10875 (void) memset((void*)sfcnOffset, 0,
10876 sizeof(time_T)*1);
10877 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
10878 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
10879 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
10880
10881 /* Set up the mdlInfo pointer */
10882# ifdef USE_RTMODEL
10883
10884 {
10885 static struct _ssBlkInfo2 _blkInfo2;
10886 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
10887 ssSetBlkInfo2Ptr(childS, blkInfo2);
10888 }
10889
10890 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
10891
10892# else
10893
10894 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
10895
10896# endif /* USE_RTMODEL */
10897
10898 /* Allocate memory of model methods 2 */
10899 {
10900 static struct _ssSFcnModelMethods2 methods2;
10901 ssSetModelMethods2(childS, &methods2);
10902 }
10903
10904 /* Allocate memory of model methods 3 */
10905 {
10906 static struct _ssSFcnModelMethods3 methods3;
10907 ssSetModelMethods3(childS, &methods3);
10908 }
10909
10910 /* Allocate memory for states auxilliary information */
10911 {
10912 static struct _ssStatesInfo2 statesInfo2;
10913 static ssPeriodicStatesInfo periodicStatesInfo;
10914 ssSetStatesInfo2(childS, &statesInfo2);
10915 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
10916 }
10917
10918 /* inputs */
10919 {
10920 static struct _ssPortInputs inputPortInfo[3];
10921 _ssSetNumInputPorts(childS, 3);
10922 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
10923
10924 /* port 0 */
10925 {
10926 static real32_T const *sfcnUPtrs[1];
10927 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
10928 ssGetLocalBlockIO(rts))->Divide_c;
10929 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
10930 _ssSetInputPortNumDimensions(childS, 0, 1);
10931 ssSetInputPortWidth(childS, 0, 1);
10932 }
10933
10934 /* port 1 */
10935 {
10936 static real32_T const *sfcnUPtrs[1];
10937 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled107;
10938 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
10939 _ssSetInputPortNumDimensions(childS, 1, 1);
10940 ssSetInputPortWidth(childS, 1, 1);
10941 }
10942
10943 /* port 2 */
10944 {
10945 static real32_T const *sfcnUPtrs[1];
10946 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled119;
10947 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
10948 _ssSetInputPortNumDimensions(childS, 2, 1);
10949 ssSetInputPortWidth(childS, 2, 1);
10950 }
10951 }
10952
10953 /* outputs */
10954 {
10955 static struct _ssPortOutputs outputPortInfo[1];
10956 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
10957 _ssSetNumOutputPorts(childS, 1);
10958
10959 /* port 0 */
10960 {
10961 _ssSetOutputPortNumDimensions(childS, 0, 1);
10962 ssSetOutputPortWidth(childS, 0, 1);
10963 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
10964 *) ssGetLocalBlockIO(rts))->GeneratedSFunction1_o));
10965 }
10966 }
10967
10968 /* path info */
10969 _ssSetModelName(childS, "SaturationLimiter_sf");
10970 _ssSetPath(childS,
10971 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/PsiLControl/Saturation Limiter2/Generated S-Function1");
10972 if (ssGetRTModel(rts) == (NULL)) {
10973 _ssSetParentSS(childS, rts);
10974 _ssSetRootSS(childS, ssGetRootSS(rts));
10975 } else {
10976 ssSetRTModel(childS,ssGetRTModel(rts));
10977 _ssSetParentSS(childS, (NULL));
10978 _ssSetRootSS(childS, childS);
10979 }
10980
10981 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
10982
10983 /* registration */
10984 SaturationLimiter_sf(childS);
10985 sfcnInitializeSizes(childS);
10986 sfcnInitializeSampleTimes(childS);
10987
10988 /* adjust sample time */
10989 ssSetSampleTime(childS, 0, 0.005);
10990 ssSetOffsetTime(childS, 0, 0.0);
10991 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[1];
10992
10993 /* set compiled values of dynamic vector attributes */
10994 ssSetNumNonsampledZCs(childS, 0);
10995
10996 /* Update connectivity flags for each port */
10997 _ssSetInputPortConnected(childS, 0, 1);
10998 _ssSetInputPortConnected(childS, 1, 1);
10999 _ssSetInputPortConnected(childS, 2, 1);
11000 _ssSetOutputPortConnected(childS, 0, 1);
11001 _ssSetOutputPortBeingMerged(childS, 0, 0);
11002
11003 /* Update the BufferDstPort flags for each input port */
11004 _ssSetInputPortBufferDstPort(childS, 0, -1);
11005 _ssSetInputPortBufferDstPort(childS, 1, -1);
11006 _ssSetInputPortBufferDstPort(childS, 2, -1);
11007
11008 /* Instance data for generated S-Function: SaturationLimiter */
11009 {
11010 SimStruct *rts = childS;
11011
11012#include "SaturationLimiter_sfcn_rtw/SaturationLimiter_sid.h"
11013
11014 }
11015 }
11016
11017 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S128>/Generated S-Function6 (Res180_sf) */
11018 {
11019 SimStruct *childS = ssGetSFunction(rts, 60);
11020
11021 /* timing info */
11022 static time_T sfcnPeriod[1];
11023 static time_T sfcnOffset[1];
11024 static int_T sfcnTsMap[1];
11025 (void) memset((void*)sfcnPeriod, 0,
11026 sizeof(time_T)*1);
11027 (void) memset((void*)sfcnOffset, 0,
11028 sizeof(time_T)*1);
11029 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
11030 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
11031 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
11032
11033 /* Set up the mdlInfo pointer */
11034# ifdef USE_RTMODEL
11035
11036 {
11037 static struct _ssBlkInfo2 _blkInfo2;
11038 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
11039 ssSetBlkInfo2Ptr(childS, blkInfo2);
11040 }
11041
11042 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
11043
11044# else
11045
11046 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
11047
11048# endif /* USE_RTMODEL */
11049
11050 /* Allocate memory of model methods 2 */
11051 {
11052 static struct _ssSFcnModelMethods2 methods2;
11053 ssSetModelMethods2(childS, &methods2);
11054 }
11055
11056 /* Allocate memory of model methods 3 */
11057 {
11058 static struct _ssSFcnModelMethods3 methods3;
11059 ssSetModelMethods3(childS, &methods3);
11060 }
11061
11062 /* Allocate memory for states auxilliary information */
11063 {
11064 static struct _ssStatesInfo2 statesInfo2;
11065 static ssPeriodicStatesInfo periodicStatesInfo;
11066 ssSetStatesInfo2(childS, &statesInfo2);
11067 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
11068 }
11069
11070 /* inputs */
11071 {
11072 static struct _ssPortInputs inputPortInfo[1];
11073 _ssSetNumInputPorts(childS, 1);
11074 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
11075
11076 /* port 0 */
11077 {
11078 static real32_T const *sfcnUPtrs[1];
11079 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
11080 ssGetLocalBlockIO(rts))->Sum3_g;
11081 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
11082 _ssSetInputPortNumDimensions(childS, 0, 1);
11083 ssSetInputPortWidth(childS, 0, 1);
11084 }
11085 }
11086
11087 /* outputs */
11088 {
11089 static struct _ssPortOutputs outputPortInfo[1];
11090 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
11091 _ssSetNumOutputPorts(childS, 1);
11092
11093 /* port 0 */
11094 {
11095 _ssSetOutputPortNumDimensions(childS, 0, 1);
11096 ssSetOutputPortWidth(childS, 0, 1);
11097 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
11098 *) ssGetLocalBlockIO(rts))->GeneratedSFunction6_g));
11099 }
11100 }
11101
11102 /* path info */
11103 _ssSetModelName(childS, "Res180_sf");
11104 _ssSetPath(childS,
11105 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/PsiLControl/Generated S-Function6");
11106 if (ssGetRTModel(rts) == (NULL)) {
11107 _ssSetParentSS(childS, rts);
11108 _ssSetRootSS(childS, ssGetRootSS(rts));
11109 } else {
11110 ssSetRTModel(childS,ssGetRTModel(rts));
11111 _ssSetParentSS(childS, (NULL));
11112 _ssSetRootSS(childS, childS);
11113 }
11114
11115 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
11116
11117 /* registration */
11118 Res180_sf(childS);
11119 sfcnInitializeSizes(childS);
11120 sfcnInitializeSampleTimes(childS);
11121
11122 /* adjust sample time */
11123 ssSetSampleTime(childS, 0, 0.0);
11124 ssSetOffsetTime(childS, 0, 0.0);
11125 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
11126
11127 /* set compiled values of dynamic vector attributes */
11128 ssSetNumNonsampledZCs(childS, 0);
11129
11130 /* Update connectivity flags for each port */
11131 _ssSetInputPortConnected(childS, 0, 1);
11132 _ssSetOutputPortConnected(childS, 0, 1);
11133 _ssSetOutputPortBeingMerged(childS, 0, 0);
11134
11135 /* Update the BufferDstPort flags for each input port */
11136 _ssSetInputPortBufferDstPort(childS, 0, -1);
11137
11138 /* Instance data for generated S-Function: Res180 */
11139 {
11140 SimStruct *rts = childS;
11141
11142#include "Res180_sfcn_rtw/Res180_sid.h"
11143
11144 }
11145 }
11146
11147 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S154>/Generated S-Function1 (SaturationLimiter_sf) */
11148 {
11149 SimStruct *childS = ssGetSFunction(rts, 61);
11150
11151 /* timing info */
11152 static time_T sfcnPeriod[1];
11153 static time_T sfcnOffset[1];
11154 static int_T sfcnTsMap[1];
11155 (void) memset((void*)sfcnPeriod, 0,
11156 sizeof(time_T)*1);
11157 (void) memset((void*)sfcnOffset, 0,
11158 sizeof(time_T)*1);
11159 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
11160 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
11161 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
11162
11163 /* Set up the mdlInfo pointer */
11164# ifdef USE_RTMODEL
11165
11166 {
11167 static struct _ssBlkInfo2 _blkInfo2;
11168 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
11169 ssSetBlkInfo2Ptr(childS, blkInfo2);
11170 }
11171
11172 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
11173
11174# else
11175
11176 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
11177
11178# endif /* USE_RTMODEL */
11179
11180 /* Allocate memory of model methods 2 */
11181 {
11182 static struct _ssSFcnModelMethods2 methods2;
11183 ssSetModelMethods2(childS, &methods2);
11184 }
11185
11186 /* Allocate memory of model methods 3 */
11187 {
11188 static struct _ssSFcnModelMethods3 methods3;
11189 ssSetModelMethods3(childS, &methods3);
11190 }
11191
11192 /* Allocate memory for states auxilliary information */
11193 {
11194 static struct _ssStatesInfo2 statesInfo2;
11195 static ssPeriodicStatesInfo periodicStatesInfo;
11196 ssSetStatesInfo2(childS, &statesInfo2);
11197 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
11198 }
11199
11200 /* inputs */
11201 {
11202 static struct _ssPortInputs inputPortInfo[3];
11203 _ssSetNumInputPorts(childS, 3);
11204 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
11205
11206 /* port 0 */
11207 {
11208 static real32_T const *sfcnUPtrs[1];
11209 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
11210 ssGetLocalBlockIO(rts))->GeneratedSFunction6_g;
11211 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
11212 _ssSetInputPortNumDimensions(childS, 0, 1);
11213 ssSetInputPortWidth(childS, 0, 1);
11214 }
11215
11216 /* port 1 */
11217 {
11218 static real32_T const *sfcnUPtrs[1];
11219 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled120;
11220 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
11221 _ssSetInputPortNumDimensions(childS, 1, 1);
11222 ssSetInputPortWidth(childS, 1, 1);
11223 }
11224
11225 /* port 2 */
11226 {
11227 static real32_T const *sfcnUPtrs[1];
11228 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled121;
11229 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
11230 _ssSetInputPortNumDimensions(childS, 2, 1);
11231 ssSetInputPortWidth(childS, 2, 1);
11232 }
11233 }
11234
11235 /* outputs */
11236 {
11237 static struct _ssPortOutputs outputPortInfo[1];
11238 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
11239 _ssSetNumOutputPorts(childS, 1);
11240
11241 /* port 0 */
11242 {
11243 _ssSetOutputPortNumDimensions(childS, 0, 1);
11244 ssSetOutputPortWidth(childS, 0, 1);
11245 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
11246 *) ssGetLocalBlockIO(rts))->GeneratedSFunction1_m));
11247 }
11248 }
11249
11250 /* path info */
11251 _ssSetModelName(childS, "SaturationLimiter_sf");
11252 _ssSetPath(childS,
11253 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/PsiLControl/Saturation Limiter1/Generated S-Function1");
11254 if (ssGetRTModel(rts) == (NULL)) {
11255 _ssSetParentSS(childS, rts);
11256 _ssSetRootSS(childS, ssGetRootSS(rts));
11257 } else {
11258 ssSetRTModel(childS,ssGetRTModel(rts));
11259 _ssSetParentSS(childS, (NULL));
11260 _ssSetRootSS(childS, childS);
11261 }
11262
11263 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
11264
11265 /* registration */
11266 SaturationLimiter_sf(childS);
11267 sfcnInitializeSizes(childS);
11268 sfcnInitializeSampleTimes(childS);
11269
11270 /* adjust sample time */
11271 ssSetSampleTime(childS, 0, 0.0);
11272 ssSetOffsetTime(childS, 0, 0.0);
11273 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
11274
11275 /* set compiled values of dynamic vector attributes */
11276 ssSetNumNonsampledZCs(childS, 0);
11277
11278 /* Update connectivity flags for each port */
11279 _ssSetInputPortConnected(childS, 0, 1);
11280 _ssSetInputPortConnected(childS, 1, 1);
11281 _ssSetInputPortConnected(childS, 2, 1);
11282 _ssSetOutputPortConnected(childS, 0, 1);
11283 _ssSetOutputPortBeingMerged(childS, 0, 0);
11284
11285 /* Update the BufferDstPort flags for each input port */
11286 _ssSetInputPortBufferDstPort(childS, 0, -1);
11287 _ssSetInputPortBufferDstPort(childS, 1, -1);
11288 _ssSetInputPortBufferDstPort(childS, 2, -1);
11289
11290 /* Instance data for generated S-Function: SaturationLimiter */
11291 {
11292 SimStruct *rts = childS;
11293
11294#include "SaturationLimiter_sfcn_rtw/SaturationLimiter_sid.h"
11295
11296 }
11297 }
11298
11299 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S158>/Generated S-Function (Gain_sf) */
11300 {
11301 SimStruct *childS = ssGetSFunction(rts, 62);
11302
11303 /* timing info */
11304 static time_T sfcnPeriod[1];
11305 static time_T sfcnOffset[1];
11306 static int_T sfcnTsMap[1];
11307 (void) memset((void*)sfcnPeriod, 0,
11308 sizeof(time_T)*1);
11309 (void) memset((void*)sfcnOffset, 0,
11310 sizeof(time_T)*1);
11311 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
11312 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
11313 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
11314
11315 /* Set up the mdlInfo pointer */
11316# ifdef USE_RTMODEL
11317
11318 {
11319 static struct _ssBlkInfo2 _blkInfo2;
11320 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
11321 ssSetBlkInfo2Ptr(childS, blkInfo2);
11322 }
11323
11324 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
11325
11326# else
11327
11328 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
11329
11330# endif /* USE_RTMODEL */
11331
11332 /* Allocate memory of model methods 2 */
11333 {
11334 static struct _ssSFcnModelMethods2 methods2;
11335 ssSetModelMethods2(childS, &methods2);
11336 }
11337
11338 /* Allocate memory of model methods 3 */
11339 {
11340 static struct _ssSFcnModelMethods3 methods3;
11341 ssSetModelMethods3(childS, &methods3);
11342 }
11343
11344 /* Allocate memory for states auxilliary information */
11345 {
11346 static struct _ssStatesInfo2 statesInfo2;
11347 static ssPeriodicStatesInfo periodicStatesInfo;
11348 ssSetStatesInfo2(childS, &statesInfo2);
11349 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
11350 }
11351
11352 /* inputs */
11353 {
11354 static struct _ssPortInputs inputPortInfo[2];
11355 _ssSetNumInputPorts(childS, 2);
11356 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
11357
11358 /* port 0 */
11359 {
11360 static real32_T const *sfcnUPtrs[1];
11361 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
11362 ssGetLocalBlockIO(rts))->GeneratedSFunction1_m;
11363 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
11364 _ssSetInputPortNumDimensions(childS, 0, 1);
11365 ssSetInputPortWidth(childS, 0, 1);
11366 }
11367
11368 /* port 1 */
11369 {
11370 static real32_T const *sfcnUPtrs[1];
11371 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled122;
11372 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
11373 _ssSetInputPortNumDimensions(childS, 1, 1);
11374 ssSetInputPortWidth(childS, 1, 1);
11375 }
11376 }
11377
11378 /* outputs */
11379 {
11380 static struct _ssPortOutputs outputPortInfo[1];
11381 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
11382 _ssSetNumOutputPorts(childS, 1);
11383
11384 /* port 0 */
11385 {
11386 _ssSetOutputPortNumDimensions(childS, 0, 1);
11387 ssSetOutputPortWidth(childS, 0, 1);
11388 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
11389 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_f));
11390 }
11391 }
11392
11393 /* path info */
11394 _ssSetModelName(childS, "Gain_sf");
11395 _ssSetPath(childS,
11396 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/PsiLControl/gain2/Generated S-Function");
11397 if (ssGetRTModel(rts) == (NULL)) {
11398 _ssSetParentSS(childS, rts);
11399 _ssSetRootSS(childS, ssGetRootSS(rts));
11400 } else {
11401 ssSetRTModel(childS,ssGetRTModel(rts));
11402 _ssSetParentSS(childS, (NULL));
11403 _ssSetRootSS(childS, childS);
11404 }
11405
11406 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
11407
11408 /* registration */
11409 Gain_sf(childS);
11410 sfcnInitializeSizes(childS);
11411 sfcnInitializeSampleTimes(childS);
11412
11413 /* adjust sample time */
11414 ssSetSampleTime(childS, 0, 0.0);
11415 ssSetOffsetTime(childS, 0, 0.0);
11416 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
11417
11418 /* set compiled values of dynamic vector attributes */
11419 ssSetNumNonsampledZCs(childS, 0);
11420
11421 /* Update connectivity flags for each port */
11422 _ssSetInputPortConnected(childS, 0, 1);
11423 _ssSetInputPortConnected(childS, 1, 1);
11424 _ssSetOutputPortConnected(childS, 0, 1);
11425 _ssSetOutputPortBeingMerged(childS, 0, 0);
11426
11427 /* Update the BufferDstPort flags for each input port */
11428 _ssSetInputPortBufferDstPort(childS, 0, -1);
11429 _ssSetInputPortBufferDstPort(childS, 1, -1);
11430
11431 /* Instance data for generated S-Function: Gain */
11432 {
11433 SimStruct *rts = childS;
11434
11435#include "Gain_sfcn_rtw/Gain_sid.h"
11436
11437 }
11438 }
11439
11440 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S152>/Generated S-Function2 (LeadLagFilter_sf) */
11441 {
11442 SimStruct *childS = ssGetSFunction(rts, 63);
11443
11444 /* timing info */
11445 static time_T sfcnPeriod[1];
11446 static time_T sfcnOffset[1];
11447 static int_T sfcnTsMap[1];
11448 (void) memset((void*)sfcnPeriod, 0,
11449 sizeof(time_T)*1);
11450 (void) memset((void*)sfcnOffset, 0,
11451 sizeof(time_T)*1);
11452 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
11453 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
11454 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
11455
11456 /* Set up the mdlInfo pointer */
11457# ifdef USE_RTMODEL
11458
11459 {
11460 static struct _ssBlkInfo2 _blkInfo2;
11461 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
11462 ssSetBlkInfo2Ptr(childS, blkInfo2);
11463 }
11464
11465 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
11466
11467# else
11468
11469 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
11470
11471# endif /* USE_RTMODEL */
11472
11473 /* Allocate memory of model methods 2 */
11474 {
11475 static struct _ssSFcnModelMethods2 methods2;
11476 ssSetModelMethods2(childS, &methods2);
11477 }
11478
11479 /* Allocate memory of model methods 3 */
11480 {
11481 static struct _ssSFcnModelMethods3 methods3;
11482 ssSetModelMethods3(childS, &methods3);
11483 }
11484
11485 /* Allocate memory for states auxilliary information */
11486 {
11487 static struct _ssStatesInfo2 statesInfo2;
11488 static ssPeriodicStatesInfo periodicStatesInfo;
11489 ssSetStatesInfo2(childS, &statesInfo2);
11490 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
11491 }
11492
11493 /* inputs */
11494 {
11495 static struct _ssPortInputs inputPortInfo[7];
11496 _ssSetNumInputPorts(childS, 7);
11497 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
11498
11499 /* port 0 */
11500 {
11501 static real32_T const *sfcnUPtrs[1];
11502 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
11503 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReuseS;
11504 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
11505 _ssSetInputPortNumDimensions(childS, 0, 1);
11506 ssSetInputPortWidth(childS, 0, 1);
11507 }
11508
11509 /* port 1 */
11510 {
11511 static int8_T const *sfcnUPtrs[1];
11512 sfcnUPtrs[0] = (int8_T const *) &((B_AFCS_MODEL1_T *)
11513 ssGetLocalBlockIO(rts))->DataTypeConversion1_h;
11514 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
11515 _ssSetInputPortNumDimensions(childS, 1, 1);
11516 ssSetInputPortWidth(childS, 1, 1);
11517 }
11518
11519 /* port 2 */
11520 {
11521 static real32_T const *sfcnUPtrs[1];
11522 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled108;
11523 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
11524 _ssSetInputPortNumDimensions(childS, 2, 1);
11525 ssSetInputPortWidth(childS, 2, 1);
11526 }
11527
11528 /* port 3 */
11529 {
11530 static real32_T const *sfcnUPtrs[1];
11531 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled105;
11532 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
11533 _ssSetInputPortNumDimensions(childS, 3, 1);
11534 ssSetInputPortWidth(childS, 3, 1);
11535 }
11536
11537 /* port 4 */
11538 {
11539 static real32_T const *sfcnUPtrs[1];
11540 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
11541 ssGetLocalBlockIO(rts))->Sum4_d;
11542 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
11543 _ssSetInputPortNumDimensions(childS, 4, 1);
11544 ssSetInputPortWidth(childS, 4, 1);
11545 }
11546
11547 /* port 5 */
11548 {
11549 static real32_T const *sfcnUPtrs[1];
11550 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
11551 ssGetLocalBlockIO(rts))->Sum4_d;
11552 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
11553 _ssSetInputPortNumDimensions(childS, 5, 1);
11554 ssSetInputPortWidth(childS, 5, 1);
11555 }
11556
11557 /* port 6 */
11558 {
11559 static real32_T const *sfcnUPtrs[1];
11560 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
11561 ssGetLocalBlockIO(rts))->GeneratedSFunction_f;
11562 _ssSetInputPortSignalPtrs(childS, 6, (InputPtrsType)&sfcnUPtrs[0]);
11563 _ssSetInputPortNumDimensions(childS, 6, 1);
11564 ssSetInputPortWidth(childS, 6, 1);
11565 }
11566 }
11567
11568 /* outputs */
11569 {
11570 static struct _ssPortOutputs outputPortInfo[1];
11571 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
11572 _ssSetNumOutputPorts(childS, 1);
11573
11574 /* port 0 */
11575 {
11576 _ssSetOutputPortNumDimensions(childS, 0, 1);
11577 ssSetOutputPortWidth(childS, 0, 1);
11578 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
11579 *) ssGetLocalBlockIO(rts))->Saturation2_p));
11580 }
11581 }
11582
11583 /* path info */
11584 _ssSetModelName(childS, "LeadLagFilter_sf");
11585 _ssSetPath(childS,
11586 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/PsiLControl/Lead lag1/Generated S-Function2");
11587 if (ssGetRTModel(rts) == (NULL)) {
11588 _ssSetParentSS(childS, rts);
11589 _ssSetRootSS(childS, ssGetRootSS(rts));
11590 } else {
11591 ssSetRTModel(childS,ssGetRTModel(rts));
11592 _ssSetParentSS(childS, (NULL));
11593 _ssSetRootSS(childS, childS);
11594 }
11595
11596 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
11597
11598 /* work vectors */
11599 {
11600 static struct _ssDWorkRecord dWorkRecord[4];
11601 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
11602 ssSetSFcnDWork(childS, dWorkRecord);
11603 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
11604 _ssSetNumDWork(childS, 4);
11605
11606 /* DWORK0 */
11607 ssSetDWorkWidth(childS, 0, 1);
11608 ssSetDWorkDataType(childS, 0,SS_SINGLE);
11609 ssSetDWorkComplexSignal(childS, 0, 0);
11610 ssSetDWorkUsedAsDState(childS, 0, 1);
11611 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 198))[0]);
11612
11613 /* DWORK1 */
11614 ssSetDWorkWidth(childS, 1, 1);
11615 ssSetDWorkDataType(childS, 1,SS_SINGLE);
11616 ssSetDWorkComplexSignal(childS, 1, 0);
11617 ssSetDWorkUsedAsDState(childS, 1, 1);
11618 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 199))[0]);
11619
11620 /* DWORK2 */
11621 ssSetDWorkWidth(childS, 2, 1);
11622 ssSetDWorkDataType(childS, 2,SS_INT8);
11623 ssSetDWorkComplexSignal(childS, 2, 0);
11624 ssSetDWorkUsedAsDState(childS, 2, 1);
11625 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 425))[0]);
11626
11627 /* DWORK3 */
11628 ssSetDWorkWidth(childS, 3, 1);
11629 ssSetDWorkDataType(childS, 3,SS_INT8);
11630 ssSetDWorkComplexSignal(childS, 3, 0);
11631 ssSetDWorkUsedAsDState(childS, 3, 1);
11632 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 426))[0]);
11633 }
11634
11635 /* registration */
11636 LeadLagFilter_sf(childS);
11637 sfcnInitializeSizes(childS);
11638 sfcnInitializeSampleTimes(childS);
11639
11640 /* adjust sample time */
11641 ssSetSampleTime(childS, 0, 0.0);
11642 ssSetOffsetTime(childS, 0, 0.0);
11643 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
11644
11645 /* set compiled values of dynamic vector attributes */
11646 ssSetNumNonsampledZCs(childS, 0);
11647
11648 /* Update connectivity flags for each port */
11649 _ssSetInputPortConnected(childS, 0, 1);
11650 _ssSetInputPortConnected(childS, 1, 1);
11651 _ssSetInputPortConnected(childS, 2, 1);
11652 _ssSetInputPortConnected(childS, 3, 1);
11653 _ssSetInputPortConnected(childS, 4, 1);
11654 _ssSetInputPortConnected(childS, 5, 1);
11655 _ssSetInputPortConnected(childS, 6, 1);
11656 _ssSetOutputPortConnected(childS, 0, 1);
11657 _ssSetOutputPortBeingMerged(childS, 0, 0);
11658
11659 /* Update the BufferDstPort flags for each input port */
11660 _ssSetInputPortBufferDstPort(childS, 0, -1);
11661 _ssSetInputPortBufferDstPort(childS, 1, -1);
11662 _ssSetInputPortBufferDstPort(childS, 2, -1);
11663 _ssSetInputPortBufferDstPort(childS, 3, -1);
11664 _ssSetInputPortBufferDstPort(childS, 4, -1);
11665 _ssSetInputPortBufferDstPort(childS, 5, -1);
11666 _ssSetInputPortBufferDstPort(childS, 6, -1);
11667
11668 /* Instance data for generated S-Function: LeadLagFilter */
11669 {
11670 SimStruct *rts = childS;
11671
11672#include "LeadLagFilter_sfcn_rtw/LeadLagFilter_sid.h"
11673
11674 }
11675 }
11676
11677 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S128>/Generated S-Function1 (Res180_sf) */
11678 {
11679 SimStruct *childS = ssGetSFunction(rts, 64);
11680
11681 /* timing info */
11682 static time_T sfcnPeriod[1];
11683 static time_T sfcnOffset[1];
11684 static int_T sfcnTsMap[1];
11685 (void) memset((void*)sfcnPeriod, 0,
11686 sizeof(time_T)*1);
11687 (void) memset((void*)sfcnOffset, 0,
11688 sizeof(time_T)*1);
11689 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
11690 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
11691 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
11692
11693 /* Set up the mdlInfo pointer */
11694# ifdef USE_RTMODEL
11695
11696 {
11697 static struct _ssBlkInfo2 _blkInfo2;
11698 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
11699 ssSetBlkInfo2Ptr(childS, blkInfo2);
11700 }
11701
11702 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
11703
11704# else
11705
11706 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
11707
11708# endif /* USE_RTMODEL */
11709
11710 /* Allocate memory of model methods 2 */
11711 {
11712 static struct _ssSFcnModelMethods2 methods2;
11713 ssSetModelMethods2(childS, &methods2);
11714 }
11715
11716 /* Allocate memory of model methods 3 */
11717 {
11718 static struct _ssSFcnModelMethods3 methods3;
11719 ssSetModelMethods3(childS, &methods3);
11720 }
11721
11722 /* Allocate memory for states auxilliary information */
11723 {
11724 static struct _ssStatesInfo2 statesInfo2;
11725 static ssPeriodicStatesInfo periodicStatesInfo;
11726 ssSetStatesInfo2(childS, &statesInfo2);
11727 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
11728 }
11729
11730 /* inputs */
11731 {
11732 static struct _ssPortInputs inputPortInfo[1];
11733 _ssSetNumInputPorts(childS, 1);
11734 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
11735
11736 /* port 0 */
11737 {
11738 static real32_T const *sfcnUPtrs[1];
11739 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
11740 ssGetLocalBlockIO(rts))->Sum1_g;
11741 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
11742 _ssSetInputPortNumDimensions(childS, 0, 1);
11743 ssSetInputPortWidth(childS, 0, 1);
11744 }
11745 }
11746
11747 /* outputs */
11748 {
11749 static struct _ssPortOutputs outputPortInfo[1];
11750 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
11751 _ssSetNumOutputPorts(childS, 1);
11752
11753 /* port 0 */
11754 {
11755 _ssSetOutputPortNumDimensions(childS, 0, 1);
11756 ssSetOutputPortWidth(childS, 0, 1);
11757 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
11758 *) ssGetLocalBlockIO(rts))->GeneratedSFunction1_hp));
11759 }
11760 }
11761
11762 /* path info */
11763 _ssSetModelName(childS, "Res180_sf");
11764 _ssSetPath(childS,
11765 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/PsiLControl/Generated S-Function1");
11766 if (ssGetRTModel(rts) == (NULL)) {
11767 _ssSetParentSS(childS, rts);
11768 _ssSetRootSS(childS, ssGetRootSS(rts));
11769 } else {
11770 ssSetRTModel(childS,ssGetRTModel(rts));
11771 _ssSetParentSS(childS, (NULL));
11772 _ssSetRootSS(childS, childS);
11773 }
11774
11775 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
11776
11777 /* registration */
11778 Res180_sf(childS);
11779 sfcnInitializeSizes(childS);
11780 sfcnInitializeSampleTimes(childS);
11781
11782 /* adjust sample time */
11783 ssSetSampleTime(childS, 0, 0.0);
11784 ssSetOffsetTime(childS, 0, 0.0);
11785 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
11786
11787 /* set compiled values of dynamic vector attributes */
11788 ssSetNumNonsampledZCs(childS, 0);
11789
11790 /* Update connectivity flags for each port */
11791 _ssSetInputPortConnected(childS, 0, 1);
11792 _ssSetOutputPortConnected(childS, 0, 1);
11793 _ssSetOutputPortBeingMerged(childS, 0, 0);
11794
11795 /* Update the BufferDstPort flags for each input port */
11796 _ssSetInputPortBufferDstPort(childS, 0, -1);
11797
11798 /* Instance data for generated S-Function: Res180 */
11799 {
11800 SimStruct *rts = childS;
11801
11802#include "Res180_sfcn_rtw/Res180_sid.h"
11803
11804 }
11805 }
11806
11807 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S153>/Generated S-Function1 (SaturationLimiter_sf) */
11808 {
11809 SimStruct *childS = ssGetSFunction(rts, 65);
11810
11811 /* timing info */
11812 static time_T sfcnPeriod[1];
11813 static time_T sfcnOffset[1];
11814 static int_T sfcnTsMap[1];
11815 (void) memset((void*)sfcnPeriod, 0,
11816 sizeof(time_T)*1);
11817 (void) memset((void*)sfcnOffset, 0,
11818 sizeof(time_T)*1);
11819 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
11820 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
11821 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
11822
11823 /* Set up the mdlInfo pointer */
11824# ifdef USE_RTMODEL
11825
11826 {
11827 static struct _ssBlkInfo2 _blkInfo2;
11828 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
11829 ssSetBlkInfo2Ptr(childS, blkInfo2);
11830 }
11831
11832 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
11833
11834# else
11835
11836 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
11837
11838# endif /* USE_RTMODEL */
11839
11840 /* Allocate memory of model methods 2 */
11841 {
11842 static struct _ssSFcnModelMethods2 methods2;
11843 ssSetModelMethods2(childS, &methods2);
11844 }
11845
11846 /* Allocate memory of model methods 3 */
11847 {
11848 static struct _ssSFcnModelMethods3 methods3;
11849 ssSetModelMethods3(childS, &methods3);
11850 }
11851
11852 /* Allocate memory for states auxilliary information */
11853 {
11854 static struct _ssStatesInfo2 statesInfo2;
11855 static ssPeriodicStatesInfo periodicStatesInfo;
11856 ssSetStatesInfo2(childS, &statesInfo2);
11857 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
11858 }
11859
11860 /* inputs */
11861 {
11862 static struct _ssPortInputs inputPortInfo[3];
11863 _ssSetNumInputPorts(childS, 3);
11864 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
11865
11866 /* port 0 */
11867 {
11868 static real32_T const *sfcnUPtrs[1];
11869 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
11870 ssGetLocalBlockIO(rts))->GeneratedSFunction1_hp;
11871 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
11872 _ssSetInputPortNumDimensions(childS, 0, 1);
11873 ssSetInputPortWidth(childS, 0, 1);
11874 }
11875
11876 /* port 1 */
11877 {
11878 static real32_T const *sfcnUPtrs[1];
11879 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled107;
11880 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
11881 _ssSetInputPortNumDimensions(childS, 1, 1);
11882 ssSetInputPortWidth(childS, 1, 1);
11883 }
11884
11885 /* port 2 */
11886 {
11887 static real32_T const *sfcnUPtrs[1];
11888 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled119;
11889 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
11890 _ssSetInputPortNumDimensions(childS, 2, 1);
11891 ssSetInputPortWidth(childS, 2, 1);
11892 }
11893 }
11894
11895 /* outputs */
11896 {
11897 static struct _ssPortOutputs outputPortInfo[1];
11898 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
11899 _ssSetNumOutputPorts(childS, 1);
11900
11901 /* port 0 */
11902 {
11903 _ssSetOutputPortNumDimensions(childS, 0, 1);
11904 ssSetOutputPortWidth(childS, 0, 1);
11905 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
11906 *) ssGetLocalBlockIO(rts))->GeneratedSFunction1_oq));
11907 }
11908 }
11909
11910 /* path info */
11911 _ssSetModelName(childS, "SaturationLimiter_sf");
11912 _ssSetPath(childS,
11913 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/PsiLControl/Saturation Limiter/Generated S-Function1");
11914 if (ssGetRTModel(rts) == (NULL)) {
11915 _ssSetParentSS(childS, rts);
11916 _ssSetRootSS(childS, ssGetRootSS(rts));
11917 } else {
11918 ssSetRTModel(childS,ssGetRTModel(rts));
11919 _ssSetParentSS(childS, (NULL));
11920 _ssSetRootSS(childS, childS);
11921 }
11922
11923 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
11924
11925 /* registration */
11926 SaturationLimiter_sf(childS);
11927 sfcnInitializeSizes(childS);
11928 sfcnInitializeSampleTimes(childS);
11929
11930 /* adjust sample time */
11931 ssSetSampleTime(childS, 0, 0.0);
11932 ssSetOffsetTime(childS, 0, 0.0);
11933 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
11934
11935 /* set compiled values of dynamic vector attributes */
11936 ssSetNumNonsampledZCs(childS, 0);
11937
11938 /* Update connectivity flags for each port */
11939 _ssSetInputPortConnected(childS, 0, 1);
11940 _ssSetInputPortConnected(childS, 1, 1);
11941 _ssSetInputPortConnected(childS, 2, 1);
11942 _ssSetOutputPortConnected(childS, 0, 1);
11943 _ssSetOutputPortBeingMerged(childS, 0, 0);
11944
11945 /* Update the BufferDstPort flags for each input port */
11946 _ssSetInputPortBufferDstPort(childS, 0, -1);
11947 _ssSetInputPortBufferDstPort(childS, 1, -1);
11948 _ssSetInputPortBufferDstPort(childS, 2, -1);
11949
11950 /* Instance data for generated S-Function: SaturationLimiter */
11951 {
11952 SimStruct *rts = childS;
11953
11954#include "SaturationLimiter_sfcn_rtw/SaturationLimiter_sid.h"
11955
11956 }
11957 }
11958
11959 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S156>/Generated S-Function (Gain_sf) */
11960 {
11961 SimStruct *childS = ssGetSFunction(rts, 66);
11962
11963 /* timing info */
11964 static time_T sfcnPeriod[1];
11965 static time_T sfcnOffset[1];
11966 static int_T sfcnTsMap[1];
11967 (void) memset((void*)sfcnPeriod, 0,
11968 sizeof(time_T)*1);
11969 (void) memset((void*)sfcnOffset, 0,
11970 sizeof(time_T)*1);
11971 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
11972 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
11973 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
11974
11975 /* Set up the mdlInfo pointer */
11976# ifdef USE_RTMODEL
11977
11978 {
11979 static struct _ssBlkInfo2 _blkInfo2;
11980 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
11981 ssSetBlkInfo2Ptr(childS, blkInfo2);
11982 }
11983
11984 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
11985
11986# else
11987
11988 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
11989
11990# endif /* USE_RTMODEL */
11991
11992 /* Allocate memory of model methods 2 */
11993 {
11994 static struct _ssSFcnModelMethods2 methods2;
11995 ssSetModelMethods2(childS, &methods2);
11996 }
11997
11998 /* Allocate memory of model methods 3 */
11999 {
12000 static struct _ssSFcnModelMethods3 methods3;
12001 ssSetModelMethods3(childS, &methods3);
12002 }
12003
12004 /* Allocate memory for states auxilliary information */
12005 {
12006 static struct _ssStatesInfo2 statesInfo2;
12007 static ssPeriodicStatesInfo periodicStatesInfo;
12008 ssSetStatesInfo2(childS, &statesInfo2);
12009 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
12010 }
12011
12012 /* inputs */
12013 {
12014 static struct _ssPortInputs inputPortInfo[2];
12015 _ssSetNumInputPorts(childS, 2);
12016 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
12017
12018 /* port 0 */
12019 {
12020 static real32_T const *sfcnUPtrs[1];
12021 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
12022 ssGetLocalBlockIO(rts))->GeneratedSFunction1_oq;
12023 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
12024 _ssSetInputPortNumDimensions(childS, 0, 1);
12025 ssSetInputPortWidth(childS, 0, 1);
12026 }
12027
12028 /* port 1 */
12029 {
12030 static real32_T const *sfcnUPtrs[1];
12031 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled108;
12032 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
12033 _ssSetInputPortNumDimensions(childS, 1, 1);
12034 ssSetInputPortWidth(childS, 1, 1);
12035 }
12036 }
12037
12038 /* outputs */
12039 {
12040 static struct _ssPortOutputs outputPortInfo[1];
12041 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
12042 _ssSetNumOutputPorts(childS, 1);
12043
12044 /* port 0 */
12045 {
12046 _ssSetOutputPortNumDimensions(childS, 0, 1);
12047 ssSetOutputPortWidth(childS, 0, 1);
12048 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
12049 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_ex));
12050 }
12051 }
12052
12053 /* path info */
12054 _ssSetModelName(childS, "Gain_sf");
12055 _ssSetPath(childS,
12056 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/PsiLControl/gain/Generated S-Function");
12057 if (ssGetRTModel(rts) == (NULL)) {
12058 _ssSetParentSS(childS, rts);
12059 _ssSetRootSS(childS, ssGetRootSS(rts));
12060 } else {
12061 ssSetRTModel(childS,ssGetRTModel(rts));
12062 _ssSetParentSS(childS, (NULL));
12063 _ssSetRootSS(childS, childS);
12064 }
12065
12066 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
12067
12068 /* registration */
12069 Gain_sf(childS);
12070 sfcnInitializeSizes(childS);
12071 sfcnInitializeSampleTimes(childS);
12072
12073 /* adjust sample time */
12074 ssSetSampleTime(childS, 0, 0.0);
12075 ssSetOffsetTime(childS, 0, 0.0);
12076 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
12077
12078 /* set compiled values of dynamic vector attributes */
12079 ssSetNumNonsampledZCs(childS, 0);
12080
12081 /* Update connectivity flags for each port */
12082 _ssSetInputPortConnected(childS, 0, 1);
12083 _ssSetInputPortConnected(childS, 1, 1);
12084 _ssSetOutputPortConnected(childS, 0, 1);
12085 _ssSetOutputPortBeingMerged(childS, 0, 0);
12086
12087 /* Update the BufferDstPort flags for each input port */
12088 _ssSetInputPortBufferDstPort(childS, 0, -1);
12089 _ssSetInputPortBufferDstPort(childS, 1, -1);
12090
12091 /* Instance data for generated S-Function: Gain */
12092 {
12093 SimStruct *rts = childS;
12094
12095#include "Gain_sfcn_rtw/Gain_sid.h"
12096
12097 }
12098 }
12099
12100 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S157>/Generated S-Function (Gain_sf) */
12101 {
12102 SimStruct *childS = ssGetSFunction(rts, 67);
12103
12104 /* timing info */
12105 static time_T sfcnPeriod[1];
12106 static time_T sfcnOffset[1];
12107 static int_T sfcnTsMap[1];
12108 (void) memset((void*)sfcnPeriod, 0,
12109 sizeof(time_T)*1);
12110 (void) memset((void*)sfcnOffset, 0,
12111 sizeof(time_T)*1);
12112 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
12113 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
12114 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
12115
12116 /* Set up the mdlInfo pointer */
12117# ifdef USE_RTMODEL
12118
12119 {
12120 static struct _ssBlkInfo2 _blkInfo2;
12121 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
12122 ssSetBlkInfo2Ptr(childS, blkInfo2);
12123 }
12124
12125 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
12126
12127# else
12128
12129 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
12130
12131# endif /* USE_RTMODEL */
12132
12133 /* Allocate memory of model methods 2 */
12134 {
12135 static struct _ssSFcnModelMethods2 methods2;
12136 ssSetModelMethods2(childS, &methods2);
12137 }
12138
12139 /* Allocate memory of model methods 3 */
12140 {
12141 static struct _ssSFcnModelMethods3 methods3;
12142 ssSetModelMethods3(childS, &methods3);
12143 }
12144
12145 /* Allocate memory for states auxilliary information */
12146 {
12147 static struct _ssStatesInfo2 statesInfo2;
12148 static ssPeriodicStatesInfo periodicStatesInfo;
12149 ssSetStatesInfo2(childS, &statesInfo2);
12150 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
12151 }
12152
12153 /* inputs */
12154 {
12155 static struct _ssPortInputs inputPortInfo[2];
12156 _ssSetNumInputPorts(childS, 2);
12157 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
12158
12159 /* port 0 */
12160 {
12161 static real32_T const *sfcnUPtrs[1];
12162 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
12163 ssGetLocalBlockIO(rts))->GeneratedSFunction_ex;
12164 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
12165 _ssSetInputPortNumDimensions(childS, 0, 1);
12166 ssSetInputPortWidth(childS, 0, 1);
12167 }
12168
12169 /* port 1 */
12170 {
12171 static real32_T const *sfcnUPtrs[1];
12172 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled116;
12173 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
12174 _ssSetInputPortNumDimensions(childS, 1, 1);
12175 ssSetInputPortWidth(childS, 1, 1);
12176 }
12177 }
12178
12179 /* outputs */
12180 {
12181 static struct _ssPortOutputs outputPortInfo[1];
12182 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
12183 _ssSetNumOutputPorts(childS, 1);
12184
12185 /* port 0 */
12186 {
12187 _ssSetOutputPortNumDimensions(childS, 0, 1);
12188 ssSetOutputPortWidth(childS, 0, 1);
12189 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
12190 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_nh));
12191 }
12192 }
12193
12194 /* path info */
12195 _ssSetModelName(childS, "Gain_sf");
12196 _ssSetPath(childS,
12197 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/PsiLControl/gain1/Generated S-Function");
12198 if (ssGetRTModel(rts) == (NULL)) {
12199 _ssSetParentSS(childS, rts);
12200 _ssSetRootSS(childS, ssGetRootSS(rts));
12201 } else {
12202 ssSetRTModel(childS,ssGetRTModel(rts));
12203 _ssSetParentSS(childS, (NULL));
12204 _ssSetRootSS(childS, childS);
12205 }
12206
12207 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
12208
12209 /* registration */
12210 Gain_sf(childS);
12211 sfcnInitializeSizes(childS);
12212 sfcnInitializeSampleTimes(childS);
12213
12214 /* adjust sample time */
12215 ssSetSampleTime(childS, 0, 0.0);
12216 ssSetOffsetTime(childS, 0, 0.0);
12217 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
12218
12219 /* set compiled values of dynamic vector attributes */
12220 ssSetNumNonsampledZCs(childS, 0);
12221
12222 /* Update connectivity flags for each port */
12223 _ssSetInputPortConnected(childS, 0, 1);
12224 _ssSetInputPortConnected(childS, 1, 1);
12225 _ssSetOutputPortConnected(childS, 0, 1);
12226 _ssSetOutputPortBeingMerged(childS, 0, 0);
12227
12228 /* Update the BufferDstPort flags for each input port */
12229 _ssSetInputPortBufferDstPort(childS, 0, -1);
12230 _ssSetInputPortBufferDstPort(childS, 1, -1);
12231
12232 /* Instance data for generated S-Function: Gain */
12233 {
12234 SimStruct *rts = childS;
12235
12236#include "Gain_sfcn_rtw/Gain_sid.h"
12237
12238 }
12239 }
12240
12241 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S150>/Generated S-Function3 (IntegratorLimited_sf) */
12242 {
12243 SimStruct *childS = ssGetSFunction(rts, 68);
12244
12245 /* timing info */
12246 static time_T sfcnPeriod[1];
12247 static time_T sfcnOffset[1];
12248 static int_T sfcnTsMap[1];
12249 (void) memset((void*)sfcnPeriod, 0,
12250 sizeof(time_T)*1);
12251 (void) memset((void*)sfcnOffset, 0,
12252 sizeof(time_T)*1);
12253 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
12254 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
12255 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
12256
12257 /* Set up the mdlInfo pointer */
12258# ifdef USE_RTMODEL
12259
12260 {
12261 static struct _ssBlkInfo2 _blkInfo2;
12262 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
12263 ssSetBlkInfo2Ptr(childS, blkInfo2);
12264 }
12265
12266 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
12267
12268# else
12269
12270 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
12271
12272# endif /* USE_RTMODEL */
12273
12274 /* Allocate memory of model methods 2 */
12275 {
12276 static struct _ssSFcnModelMethods2 methods2;
12277 ssSetModelMethods2(childS, &methods2);
12278 }
12279
12280 /* Allocate memory of model methods 3 */
12281 {
12282 static struct _ssSFcnModelMethods3 methods3;
12283 ssSetModelMethods3(childS, &methods3);
12284 }
12285
12286 /* Allocate memory for states auxilliary information */
12287 {
12288 static struct _ssStatesInfo2 statesInfo2;
12289 static ssPeriodicStatesInfo periodicStatesInfo;
12290 ssSetStatesInfo2(childS, &statesInfo2);
12291 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
12292 }
12293
12294 /* inputs */
12295 {
12296 static struct _ssPortInputs inputPortInfo[7];
12297 _ssSetNumInputPorts(childS, 7);
12298 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
12299
12300 /* port 0 */
12301 {
12302 static real32_T const *sfcnUPtrs[1];
12303 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
12304 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReuseS;
12305 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
12306 _ssSetInputPortNumDimensions(childS, 0, 1);
12307 ssSetInputPortWidth(childS, 0, 1);
12308 }
12309
12310 /* port 1 */
12311 {
12312 static int8_T const *sfcnUPtrs[1];
12313 sfcnUPtrs[0] = (int8_T const *) &((B_AFCS_MODEL1_T *)
12314 ssGetLocalBlockIO(rts))->DataTypeConversion1_h;
12315 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
12316 _ssSetInputPortNumDimensions(childS, 1, 1);
12317 ssSetInputPortWidth(childS, 1, 1);
12318 }
12319
12320 /* port 2 */
12321 {
12322 static real32_T const *sfcnUPtrs[1];
12323 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled106;
12324 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
12325 _ssSetInputPortNumDimensions(childS, 2, 1);
12326 ssSetInputPortWidth(childS, 2, 1);
12327 }
12328
12329 /* port 3 */
12330 {
12331 static real32_T const *sfcnUPtrs[1];
12332 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled106;
12333 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
12334 _ssSetInputPortNumDimensions(childS, 3, 1);
12335 ssSetInputPortWidth(childS, 3, 1);
12336 }
12337
12338 /* port 4 */
12339 {
12340 static real32_T const *sfcnUPtrs[1];
12341 sfcnUPtrs[0] = (real32_T const *)
12342 &AFCS_MODEL1_ConstP.Constant29_Value;
12343 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
12344 _ssSetInputPortNumDimensions(childS, 4, 1);
12345 ssSetInputPortWidth(childS, 4, 1);
12346 }
12347
12348 /* port 5 */
12349 {
12350 static real32_T const *sfcnUPtrs[1];
12351 sfcnUPtrs[0] = (real32_T const *)
12352 &AFCS_MODEL1_ConstP.Constant30_Value;
12353 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
12354 _ssSetInputPortNumDimensions(childS, 5, 1);
12355 ssSetInputPortWidth(childS, 5, 1);
12356 }
12357
12358 /* port 6 */
12359 {
12360 static real32_T const *sfcnUPtrs[1];
12361 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
12362 ssGetLocalBlockIO(rts))->GeneratedSFunction_nh;
12363 _ssSetInputPortSignalPtrs(childS, 6, (InputPtrsType)&sfcnUPtrs[0]);
12364 _ssSetInputPortNumDimensions(childS, 6, 1);
12365 ssSetInputPortWidth(childS, 6, 1);
12366 }
12367 }
12368
12369 /* outputs */
12370 {
12371 static struct _ssPortOutputs outputPortInfo[1];
12372 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
12373 _ssSetNumOutputPorts(childS, 1);
12374
12375 /* port 0 */
12376 {
12377 _ssSetOutputPortNumDimensions(childS, 0, 1);
12378 ssSetOutputPortWidth(childS, 0, 1);
12379 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
12380 *) ssGetLocalBlockIO(rts))->Saturation2_p));
12381 }
12382 }
12383
12384 /* path info */
12385 _ssSetModelName(childS, "IntegratorLimited_sf");
12386 _ssSetPath(childS,
12387 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/PsiLControl/Integrator Limited/Generated S-Function3");
12388 if (ssGetRTModel(rts) == (NULL)) {
12389 _ssSetParentSS(childS, rts);
12390 _ssSetRootSS(childS, ssGetRootSS(rts));
12391 } else {
12392 ssSetRTModel(childS,ssGetRTModel(rts));
12393 _ssSetParentSS(childS, (NULL));
12394 _ssSetRootSS(childS, childS);
12395 }
12396
12397 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
12398
12399 /* work vectors */
12400 {
12401 static struct _ssDWorkRecord dWorkRecord[4];
12402 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
12403 ssSetSFcnDWork(childS, dWorkRecord);
12404 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
12405 _ssSetNumDWork(childS, 4);
12406
12407 /* DWORK0 */
12408 ssSetDWorkWidth(childS, 0, 1);
12409 ssSetDWorkDataType(childS, 0,SS_SINGLE);
12410 ssSetDWorkComplexSignal(childS, 0, 0);
12411 ssSetDWorkUsedAsDState(childS, 0, 1);
12412 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 200))[0]);
12413
12414 /* DWORK1 */
12415 ssSetDWorkWidth(childS, 1, 1);
12416 ssSetDWorkDataType(childS, 1,SS_SINGLE);
12417 ssSetDWorkComplexSignal(childS, 1, 0);
12418 ssSetDWorkUsedAsDState(childS, 1, 1);
12419 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 201))[0]);
12420
12421 /* DWORK2 */
12422 ssSetDWorkWidth(childS, 2, 1);
12423 ssSetDWorkDataType(childS, 2,SS_INT8);
12424 ssSetDWorkComplexSignal(childS, 2, 0);
12425 ssSetDWorkUsedAsDState(childS, 2, 1);
12426 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 427))[0]);
12427
12428 /* DWORK3 */
12429 ssSetDWorkWidth(childS, 3, 1);
12430 ssSetDWorkDataType(childS, 3,SS_INT8);
12431 ssSetDWorkComplexSignal(childS, 3, 0);
12432 ssSetDWorkUsedAsDState(childS, 3, 1);
12433 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 428))[0]);
12434 }
12435
12436 /* registration */
12437 IntegratorLimited_sf(childS);
12438 sfcnInitializeSizes(childS);
12439 sfcnInitializeSampleTimes(childS);
12440
12441 /* adjust sample time */
12442 ssSetSampleTime(childS, 0, 0.0);
12443 ssSetOffsetTime(childS, 0, 0.0);
12444 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
12445
12446 /* set compiled values of dynamic vector attributes */
12447 ssSetNumNonsampledZCs(childS, 0);
12448
12449 /* Update connectivity flags for each port */
12450 _ssSetInputPortConnected(childS, 0, 1);
12451 _ssSetInputPortConnected(childS, 1, 1);
12452 _ssSetInputPortConnected(childS, 2, 1);
12453 _ssSetInputPortConnected(childS, 3, 1);
12454 _ssSetInputPortConnected(childS, 4, 1);
12455 _ssSetInputPortConnected(childS, 5, 1);
12456 _ssSetInputPortConnected(childS, 6, 1);
12457 _ssSetOutputPortConnected(childS, 0, 1);
12458 _ssSetOutputPortBeingMerged(childS, 0, 0);
12459
12460 /* Update the BufferDstPort flags for each input port */
12461 _ssSetInputPortBufferDstPort(childS, 0, -1);
12462 _ssSetInputPortBufferDstPort(childS, 1, -1);
12463 _ssSetInputPortBufferDstPort(childS, 2, -1);
12464 _ssSetInputPortBufferDstPort(childS, 3, -1);
12465 _ssSetInputPortBufferDstPort(childS, 4, -1);
12466 _ssSetInputPortBufferDstPort(childS, 5, -1);
12467 _ssSetInputPortBufferDstPort(childS, 6, -1);
12468
12469 /* Instance data for generated S-Function: IntegratorLimited */
12470 {
12471 SimStruct *rts = childS;
12472
12473#include "IntegratorLimited_sfcn_rtw/IntegratorLimited_sid.h"
12474
12475 }
12476 }
12477
12478 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S151>/Generated S-Function2 (LeadLagFilter_sf) */
12479 {
12480 SimStruct *childS = ssGetSFunction(rts, 69);
12481
12482 /* timing info */
12483 static time_T sfcnPeriod[1];
12484 static time_T sfcnOffset[1];
12485 static int_T sfcnTsMap[1];
12486 (void) memset((void*)sfcnPeriod, 0,
12487 sizeof(time_T)*1);
12488 (void) memset((void*)sfcnOffset, 0,
12489 sizeof(time_T)*1);
12490 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
12491 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
12492 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
12493
12494 /* Set up the mdlInfo pointer */
12495# ifdef USE_RTMODEL
12496
12497 {
12498 static struct _ssBlkInfo2 _blkInfo2;
12499 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
12500 ssSetBlkInfo2Ptr(childS, blkInfo2);
12501 }
12502
12503 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
12504
12505# else
12506
12507 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
12508
12509# endif /* USE_RTMODEL */
12510
12511 /* Allocate memory of model methods 2 */
12512 {
12513 static struct _ssSFcnModelMethods2 methods2;
12514 ssSetModelMethods2(childS, &methods2);
12515 }
12516
12517 /* Allocate memory of model methods 3 */
12518 {
12519 static struct _ssSFcnModelMethods3 methods3;
12520 ssSetModelMethods3(childS, &methods3);
12521 }
12522
12523 /* Allocate memory for states auxilliary information */
12524 {
12525 static struct _ssStatesInfo2 statesInfo2;
12526 static ssPeriodicStatesInfo periodicStatesInfo;
12527 ssSetStatesInfo2(childS, &statesInfo2);
12528 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
12529 }
12530
12531 /* inputs */
12532 {
12533 static struct _ssPortInputs inputPortInfo[7];
12534 _ssSetNumInputPorts(childS, 7);
12535 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
12536
12537 /* port 0 */
12538 {
12539 static real32_T const *sfcnUPtrs[1];
12540 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
12541 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReuseS;
12542 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
12543 _ssSetInputPortNumDimensions(childS, 0, 1);
12544 ssSetInputPortWidth(childS, 0, 1);
12545 }
12546
12547 /* port 1 */
12548 {
12549 static int8_T const *sfcnUPtrs[1];
12550 sfcnUPtrs[0] = (int8_T const *) &((B_AFCS_MODEL1_T *)
12551 ssGetLocalBlockIO(rts))->DataTypeConversion1_h;
12552 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
12553 _ssSetInputPortNumDimensions(childS, 1, 1);
12554 ssSetInputPortWidth(childS, 1, 1);
12555 }
12556
12557 /* port 2 */
12558 {
12559 static real32_T const *sfcnUPtrs[1];
12560 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled108;
12561 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
12562 _ssSetInputPortNumDimensions(childS, 2, 1);
12563 ssSetInputPortWidth(childS, 2, 1);
12564 }
12565
12566 /* port 3 */
12567 {
12568 static real32_T const *sfcnUPtrs[1];
12569 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled108;
12570 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
12571 _ssSetInputPortNumDimensions(childS, 3, 1);
12572 ssSetInputPortWidth(childS, 3, 1);
12573 }
12574
12575 /* port 4 */
12576 {
12577 static real32_T const *sfcnUPtrs[1];
12578 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
12579 ssGetLocalBlockIO(rts))->Switch_bg;
12580 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
12581 _ssSetInputPortNumDimensions(childS, 4, 1);
12582 ssSetInputPortWidth(childS, 4, 1);
12583 }
12584
12585 /* port 5 */
12586 {
12587 static real32_T const *sfcnUPtrs[1];
12588 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
12589 ssGetLocalBlockIO(rts))->Switch_bg;
12590 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
12591 _ssSetInputPortNumDimensions(childS, 5, 1);
12592 ssSetInputPortWidth(childS, 5, 1);
12593 }
12594
12595 /* port 6 */
12596 {
12597 static real32_T const *sfcnUPtrs[1];
12598 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
12599 ssGetLocalBlockIO(rts))->Sum_d;
12600 _ssSetInputPortSignalPtrs(childS, 6, (InputPtrsType)&sfcnUPtrs[0]);
12601 _ssSetInputPortNumDimensions(childS, 6, 1);
12602 ssSetInputPortWidth(childS, 6, 1);
12603 }
12604 }
12605
12606 /* outputs */
12607 {
12608 static struct _ssPortOutputs outputPortInfo[1];
12609 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
12610 _ssSetNumOutputPorts(childS, 1);
12611
12612 /* port 0 */
12613 {
12614 _ssSetOutputPortNumDimensions(childS, 0, 1);
12615 ssSetOutputPortWidth(childS, 0, 1);
12616 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
12617 *) ssGetLocalBlockIO(rts))->GeneratedSFunction2_i));
12618 }
12619 }
12620
12621 /* path info */
12622 _ssSetModelName(childS, "LeadLagFilter_sf");
12623 _ssSetPath(childS,
12624 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/PsiLControl/Lead lag/Generated S-Function2");
12625 if (ssGetRTModel(rts) == (NULL)) {
12626 _ssSetParentSS(childS, rts);
12627 _ssSetRootSS(childS, ssGetRootSS(rts));
12628 } else {
12629 ssSetRTModel(childS,ssGetRTModel(rts));
12630 _ssSetParentSS(childS, (NULL));
12631 _ssSetRootSS(childS, childS);
12632 }
12633
12634 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
12635
12636 /* work vectors */
12637 {
12638 static struct _ssDWorkRecord dWorkRecord[4];
12639 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
12640 ssSetSFcnDWork(childS, dWorkRecord);
12641 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
12642 _ssSetNumDWork(childS, 4);
12643
12644 /* DWORK0 */
12645 ssSetDWorkWidth(childS, 0, 1);
12646 ssSetDWorkDataType(childS, 0,SS_SINGLE);
12647 ssSetDWorkComplexSignal(childS, 0, 0);
12648 ssSetDWorkUsedAsDState(childS, 0, 1);
12649 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 202))[0]);
12650
12651 /* DWORK1 */
12652 ssSetDWorkWidth(childS, 1, 1);
12653 ssSetDWorkDataType(childS, 1,SS_SINGLE);
12654 ssSetDWorkComplexSignal(childS, 1, 0);
12655 ssSetDWorkUsedAsDState(childS, 1, 1);
12656 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 203))[0]);
12657
12658 /* DWORK2 */
12659 ssSetDWorkWidth(childS, 2, 1);
12660 ssSetDWorkDataType(childS, 2,SS_INT8);
12661 ssSetDWorkComplexSignal(childS, 2, 0);
12662 ssSetDWorkUsedAsDState(childS, 2, 1);
12663 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 429))[0]);
12664
12665 /* DWORK3 */
12666 ssSetDWorkWidth(childS, 3, 1);
12667 ssSetDWorkDataType(childS, 3,SS_INT8);
12668 ssSetDWorkComplexSignal(childS, 3, 0);
12669 ssSetDWorkUsedAsDState(childS, 3, 1);
12670 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 430))[0]);
12671 }
12672
12673 /* registration */
12674 LeadLagFilter_sf(childS);
12675 sfcnInitializeSizes(childS);
12676 sfcnInitializeSampleTimes(childS);
12677
12678 /* adjust sample time */
12679 ssSetSampleTime(childS, 0, 0.0);
12680 ssSetOffsetTime(childS, 0, 0.0);
12681 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
12682
12683 /* set compiled values of dynamic vector attributes */
12684 ssSetNumNonsampledZCs(childS, 0);
12685
12686 /* Update connectivity flags for each port */
12687 _ssSetInputPortConnected(childS, 0, 1);
12688 _ssSetInputPortConnected(childS, 1, 1);
12689 _ssSetInputPortConnected(childS, 2, 1);
12690 _ssSetInputPortConnected(childS, 3, 1);
12691 _ssSetInputPortConnected(childS, 4, 1);
12692 _ssSetInputPortConnected(childS, 5, 1);
12693 _ssSetInputPortConnected(childS, 6, 1);
12694 _ssSetOutputPortConnected(childS, 0, 1);
12695 _ssSetOutputPortBeingMerged(childS, 0, 0);
12696
12697 /* Update the BufferDstPort flags for each input port */
12698 _ssSetInputPortBufferDstPort(childS, 0, -1);
12699 _ssSetInputPortBufferDstPort(childS, 1, -1);
12700 _ssSetInputPortBufferDstPort(childS, 2, -1);
12701 _ssSetInputPortBufferDstPort(childS, 3, -1);
12702 _ssSetInputPortBufferDstPort(childS, 4, -1);
12703 _ssSetInputPortBufferDstPort(childS, 5, -1);
12704 _ssSetInputPortBufferDstPort(childS, 6, -1);
12705
12706 /* Instance data for generated S-Function: LeadLagFilter */
12707 {
12708 SimStruct *rts = childS;
12709
12710#include "LeadLagFilter_sfcn_rtw/LeadLagFilter_sid.h"
12711
12712 }
12713 }
12714
12715 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S149>/Generated S-Function4 (LagFilter_sf) */
12716 {
12717 SimStruct *childS = ssGetSFunction(rts, 70);
12718
12719 /* timing info */
12720 static time_T sfcnPeriod[1];
12721 static time_T sfcnOffset[1];
12722 static int_T sfcnTsMap[1];
12723 (void) memset((void*)sfcnPeriod, 0,
12724 sizeof(time_T)*1);
12725 (void) memset((void*)sfcnOffset, 0,
12726 sizeof(time_T)*1);
12727 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
12728 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
12729 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
12730
12731 /* Set up the mdlInfo pointer */
12732# ifdef USE_RTMODEL
12733
12734 {
12735 static struct _ssBlkInfo2 _blkInfo2;
12736 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
12737 ssSetBlkInfo2Ptr(childS, blkInfo2);
12738 }
12739
12740 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
12741
12742# else
12743
12744 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
12745
12746# endif /* USE_RTMODEL */
12747
12748 /* Allocate memory of model methods 2 */
12749 {
12750 static struct _ssSFcnModelMethods2 methods2;
12751 ssSetModelMethods2(childS, &methods2);
12752 }
12753
12754 /* Allocate memory of model methods 3 */
12755 {
12756 static struct _ssSFcnModelMethods3 methods3;
12757 ssSetModelMethods3(childS, &methods3);
12758 }
12759
12760 /* Allocate memory for states auxilliary information */
12761 {
12762 static struct _ssStatesInfo2 statesInfo2;
12763 static ssPeriodicStatesInfo periodicStatesInfo;
12764 ssSetStatesInfo2(childS, &statesInfo2);
12765 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
12766 }
12767
12768 /* inputs */
12769 {
12770 static struct _ssPortInputs inputPortInfo[6];
12771 _ssSetNumInputPorts(childS, 6);
12772 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
12773
12774 /* port 0 */
12775 {
12776 static real32_T const *sfcnUPtrs[1];
12777 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
12778 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReuseS;
12779 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
12780 _ssSetInputPortNumDimensions(childS, 0, 1);
12781 ssSetInputPortWidth(childS, 0, 1);
12782 }
12783
12784 /* port 1 */
12785 {
12786 static int8_T const *sfcnUPtrs[1];
12787 sfcnUPtrs[0] = (int8_T const *) &((B_AFCS_MODEL1_T *)
12788 ssGetLocalBlockIO(rts))->DataTypeConversion1_h;
12789 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
12790 _ssSetInputPortNumDimensions(childS, 1, 1);
12791 ssSetInputPortWidth(childS, 1, 1);
12792 }
12793
12794 /* port 2 */
12795 {
12796 static real32_T const *sfcnUPtrs[1];
12797 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled107;
12798 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
12799 _ssSetInputPortNumDimensions(childS, 2, 1);
12800 ssSetInputPortWidth(childS, 2, 1);
12801 }
12802
12803 /* port 3 */
12804 {
12805 static real32_T const *sfcnUPtrs[1];
12806 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
12807 ssGetLocalBlockIO(rts))->Switch_bg;
12808 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
12809 _ssSetInputPortNumDimensions(childS, 3, 1);
12810 ssSetInputPortWidth(childS, 3, 1);
12811 }
12812
12813 /* port 4 */
12814 {
12815 static real32_T const *sfcnUPtrs[1];
12816 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
12817 ssGetLocalBlockIO(rts))->Switch_bg;
12818 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
12819 _ssSetInputPortNumDimensions(childS, 4, 1);
12820 ssSetInputPortWidth(childS, 4, 1);
12821 }
12822
12823 /* port 5 */
12824 {
12825 static real32_T const *sfcnUPtrs[1];
12826 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
12827 ssGetLocalBlockIO(rts))->GeneratedSFunction2_i;
12828 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
12829 _ssSetInputPortNumDimensions(childS, 5, 1);
12830 ssSetInputPortWidth(childS, 5, 1);
12831 }
12832 }
12833
12834 /* outputs */
12835 {
12836 static struct _ssPortOutputs outputPortInfo[1];
12837 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
12838 _ssSetNumOutputPorts(childS, 1);
12839
12840 /* port 0 */
12841 {
12842 _ssSetOutputPortNumDimensions(childS, 0, 1);
12843 ssSetOutputPortWidth(childS, 0, 1);
12844 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
12845 *) ssGetLocalBlockIO(rts))->GeneratedSFunction4_dc));
12846 }
12847 }
12848
12849 /* path info */
12850 _ssSetModelName(childS, "LagFilter_sf");
12851 _ssSetPath(childS,
12852 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/PsiLControl/ lag filter/Generated S-Function4");
12853 if (ssGetRTModel(rts) == (NULL)) {
12854 _ssSetParentSS(childS, rts);
12855 _ssSetRootSS(childS, ssGetRootSS(rts));
12856 } else {
12857 ssSetRTModel(childS,ssGetRTModel(rts));
12858 _ssSetParentSS(childS, (NULL));
12859 _ssSetRootSS(childS, childS);
12860 }
12861
12862 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
12863
12864 /* work vectors */
12865 {
12866 static struct _ssDWorkRecord dWorkRecord[4];
12867 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
12868 ssSetSFcnDWork(childS, dWorkRecord);
12869 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
12870 _ssSetNumDWork(childS, 4);
12871
12872 /* DWORK0 */
12873 ssSetDWorkWidth(childS, 0, 1);
12874 ssSetDWorkDataType(childS, 0,SS_SINGLE);
12875 ssSetDWorkComplexSignal(childS, 0, 0);
12876 ssSetDWorkUsedAsDState(childS, 0, 1);
12877 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 204))[0]);
12878
12879 /* DWORK1 */
12880 ssSetDWorkWidth(childS, 1, 1);
12881 ssSetDWorkDataType(childS, 1,SS_SINGLE);
12882 ssSetDWorkComplexSignal(childS, 1, 0);
12883 ssSetDWorkUsedAsDState(childS, 1, 1);
12884 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 205))[0]);
12885
12886 /* DWORK2 */
12887 ssSetDWorkWidth(childS, 2, 1);
12888 ssSetDWorkDataType(childS, 2,SS_INT8);
12889 ssSetDWorkComplexSignal(childS, 2, 0);
12890 ssSetDWorkUsedAsDState(childS, 2, 1);
12891 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 431))[0]);
12892
12893 /* DWORK3 */
12894 ssSetDWorkWidth(childS, 3, 1);
12895 ssSetDWorkDataType(childS, 3,SS_INT8);
12896 ssSetDWorkComplexSignal(childS, 3, 0);
12897 ssSetDWorkUsedAsDState(childS, 3, 1);
12898 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 432))[0]);
12899 }
12900
12901 /* registration */
12902 LagFilter_sf(childS);
12903 sfcnInitializeSizes(childS);
12904 sfcnInitializeSampleTimes(childS);
12905
12906 /* adjust sample time */
12907 ssSetSampleTime(childS, 0, 0.0);
12908 ssSetOffsetTime(childS, 0, 0.0);
12909 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
12910
12911 /* set compiled values of dynamic vector attributes */
12912 ssSetNumNonsampledZCs(childS, 0);
12913
12914 /* Update connectivity flags for each port */
12915 _ssSetInputPortConnected(childS, 0, 1);
12916 _ssSetInputPortConnected(childS, 1, 1);
12917 _ssSetInputPortConnected(childS, 2, 1);
12918 _ssSetInputPortConnected(childS, 3, 1);
12919 _ssSetInputPortConnected(childS, 4, 1);
12920 _ssSetInputPortConnected(childS, 5, 1);
12921 _ssSetOutputPortConnected(childS, 0, 1);
12922 _ssSetOutputPortBeingMerged(childS, 0, 0);
12923
12924 /* Update the BufferDstPort flags for each input port */
12925 _ssSetInputPortBufferDstPort(childS, 0, -1);
12926 _ssSetInputPortBufferDstPort(childS, 1, -1);
12927 _ssSetInputPortBufferDstPort(childS, 2, -1);
12928 _ssSetInputPortBufferDstPort(childS, 3, -1);
12929 _ssSetInputPortBufferDstPort(childS, 4, -1);
12930 _ssSetInputPortBufferDstPort(childS, 5, -1);
12931
12932 /* Instance data for generated S-Function: LagFilter */
12933 {
12934 SimStruct *rts = childS;
12935
12936#include "LagFilter_sfcn_rtw/LagFilter_sid.h"
12937
12938 }
12939 }
12940
12941 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S145>/Generated S-Function1 (SaturationLimiter_sf) */
12942 {
12943 SimStruct *childS = ssGetSFunction(rts, 71);
12944
12945 /* timing info */
12946 static time_T sfcnPeriod[1];
12947 static time_T sfcnOffset[1];
12948 static int_T sfcnTsMap[1];
12949 (void) memset((void*)sfcnPeriod, 0,
12950 sizeof(time_T)*1);
12951 (void) memset((void*)sfcnOffset, 0,
12952 sizeof(time_T)*1);
12953 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
12954 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
12955 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
12956
12957 /* Set up the mdlInfo pointer */
12958# ifdef USE_RTMODEL
12959
12960 {
12961 static struct _ssBlkInfo2 _blkInfo2;
12962 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
12963 ssSetBlkInfo2Ptr(childS, blkInfo2);
12964 }
12965
12966 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
12967
12968# else
12969
12970 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
12971
12972# endif /* USE_RTMODEL */
12973
12974 /* Allocate memory of model methods 2 */
12975 {
12976 static struct _ssSFcnModelMethods2 methods2;
12977 ssSetModelMethods2(childS, &methods2);
12978 }
12979
12980 /* Allocate memory of model methods 3 */
12981 {
12982 static struct _ssSFcnModelMethods3 methods3;
12983 ssSetModelMethods3(childS, &methods3);
12984 }
12985
12986 /* Allocate memory for states auxilliary information */
12987 {
12988 static struct _ssStatesInfo2 statesInfo2;
12989 static ssPeriodicStatesInfo periodicStatesInfo;
12990 ssSetStatesInfo2(childS, &statesInfo2);
12991 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
12992 }
12993
12994 /* inputs */
12995 {
12996 static struct _ssPortInputs inputPortInfo[3];
12997 _ssSetNumInputPorts(childS, 3);
12998 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
12999
13000 /* port 0 */
13001 {
13002 static real32_T const *sfcnUPtrs[1];
13003 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
13004 ssGetLocalBlockIO(rts))->Divide_l;
13005 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
13006 _ssSetInputPortNumDimensions(childS, 0, 1);
13007 ssSetInputPortWidth(childS, 0, 1);
13008 }
13009
13010 /* port 1 */
13011 {
13012 static real32_T const *sfcnUPtrs[1];
13013 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled107;
13014 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
13015 _ssSetInputPortNumDimensions(childS, 1, 1);
13016 ssSetInputPortWidth(childS, 1, 1);
13017 }
13018
13019 /* port 2 */
13020 {
13021 static real32_T const *sfcnUPtrs[1];
13022 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled119;
13023 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
13024 _ssSetInputPortNumDimensions(childS, 2, 1);
13025 ssSetInputPortWidth(childS, 2, 1);
13026 }
13027 }
13028
13029 /* outputs */
13030 {
13031 static struct _ssPortOutputs outputPortInfo[1];
13032 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
13033 _ssSetNumOutputPorts(childS, 1);
13034
13035 /* port 0 */
13036 {
13037 _ssSetOutputPortNumDimensions(childS, 0, 1);
13038 ssSetOutputPortWidth(childS, 0, 1);
13039 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
13040 *) ssGetLocalBlockIO(rts))->GeneratedSFunction1_p));
13041 }
13042 }
13043
13044 /* path info */
13045 _ssSetModelName(childS, "SaturationLimiter_sf");
13046 _ssSetPath(childS,
13047 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/PsdLControl/Saturation Limiter2/Generated S-Function1");
13048 if (ssGetRTModel(rts) == (NULL)) {
13049 _ssSetParentSS(childS, rts);
13050 _ssSetRootSS(childS, ssGetRootSS(rts));
13051 } else {
13052 ssSetRTModel(childS,ssGetRTModel(rts));
13053 _ssSetParentSS(childS, (NULL));
13054 _ssSetRootSS(childS, childS);
13055 }
13056
13057 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
13058
13059 /* registration */
13060 SaturationLimiter_sf(childS);
13061 sfcnInitializeSizes(childS);
13062 sfcnInitializeSampleTimes(childS);
13063
13064 /* adjust sample time */
13065 ssSetSampleTime(childS, 0, 0.005);
13066 ssSetOffsetTime(childS, 0, 0.0);
13067 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[1];
13068
13069 /* set compiled values of dynamic vector attributes */
13070 ssSetNumNonsampledZCs(childS, 0);
13071
13072 /* Update connectivity flags for each port */
13073 _ssSetInputPortConnected(childS, 0, 1);
13074 _ssSetInputPortConnected(childS, 1, 1);
13075 _ssSetInputPortConnected(childS, 2, 1);
13076 _ssSetOutputPortConnected(childS, 0, 1);
13077 _ssSetOutputPortBeingMerged(childS, 0, 0);
13078
13079 /* Update the BufferDstPort flags for each input port */
13080 _ssSetInputPortBufferDstPort(childS, 0, -1);
13081 _ssSetInputPortBufferDstPort(childS, 1, -1);
13082 _ssSetInputPortBufferDstPort(childS, 2, -1);
13083
13084 /* Instance data for generated S-Function: SaturationLimiter */
13085 {
13086 SimStruct *rts = childS;
13087
13088#include "SaturationLimiter_sfcn_rtw/SaturationLimiter_sid.h"
13089
13090 }
13091 }
13092
13093 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S127>/Generated S-Function6 (Res180_sf) */
13094 {
13095 SimStruct *childS = ssGetSFunction(rts, 72);
13096
13097 /* timing info */
13098 static time_T sfcnPeriod[1];
13099 static time_T sfcnOffset[1];
13100 static int_T sfcnTsMap[1];
13101 (void) memset((void*)sfcnPeriod, 0,
13102 sizeof(time_T)*1);
13103 (void) memset((void*)sfcnOffset, 0,
13104 sizeof(time_T)*1);
13105 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
13106 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
13107 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
13108
13109 /* Set up the mdlInfo pointer */
13110# ifdef USE_RTMODEL
13111
13112 {
13113 static struct _ssBlkInfo2 _blkInfo2;
13114 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
13115 ssSetBlkInfo2Ptr(childS, blkInfo2);
13116 }
13117
13118 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
13119
13120# else
13121
13122 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
13123
13124# endif /* USE_RTMODEL */
13125
13126 /* Allocate memory of model methods 2 */
13127 {
13128 static struct _ssSFcnModelMethods2 methods2;
13129 ssSetModelMethods2(childS, &methods2);
13130 }
13131
13132 /* Allocate memory of model methods 3 */
13133 {
13134 static struct _ssSFcnModelMethods3 methods3;
13135 ssSetModelMethods3(childS, &methods3);
13136 }
13137
13138 /* Allocate memory for states auxilliary information */
13139 {
13140 static struct _ssStatesInfo2 statesInfo2;
13141 static ssPeriodicStatesInfo periodicStatesInfo;
13142 ssSetStatesInfo2(childS, &statesInfo2);
13143 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
13144 }
13145
13146 /* inputs */
13147 {
13148 static struct _ssPortInputs inputPortInfo[1];
13149 _ssSetNumInputPorts(childS, 1);
13150 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
13151
13152 /* port 0 */
13153 {
13154 static real32_T const *sfcnUPtrs[1];
13155 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
13156 ssGetLocalBlockIO(rts))->Sum3_c;
13157 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
13158 _ssSetInputPortNumDimensions(childS, 0, 1);
13159 ssSetInputPortWidth(childS, 0, 1);
13160 }
13161 }
13162
13163 /* outputs */
13164 {
13165 static struct _ssPortOutputs outputPortInfo[1];
13166 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
13167 _ssSetNumOutputPorts(childS, 1);
13168
13169 /* port 0 */
13170 {
13171 _ssSetOutputPortNumDimensions(childS, 0, 1);
13172 ssSetOutputPortWidth(childS, 0, 1);
13173 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
13174 *) ssGetLocalBlockIO(rts))->GeneratedSFunction6_a));
13175 }
13176 }
13177
13178 /* path info */
13179 _ssSetModelName(childS, "Res180_sf");
13180 _ssSetPath(childS,
13181 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/PsdLControl/Generated S-Function6");
13182 if (ssGetRTModel(rts) == (NULL)) {
13183 _ssSetParentSS(childS, rts);
13184 _ssSetRootSS(childS, ssGetRootSS(rts));
13185 } else {
13186 ssSetRTModel(childS,ssGetRTModel(rts));
13187 _ssSetParentSS(childS, (NULL));
13188 _ssSetRootSS(childS, childS);
13189 }
13190
13191 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
13192
13193 /* registration */
13194 Res180_sf(childS);
13195 sfcnInitializeSizes(childS);
13196 sfcnInitializeSampleTimes(childS);
13197
13198 /* adjust sample time */
13199 ssSetSampleTime(childS, 0, 0.0);
13200 ssSetOffsetTime(childS, 0, 0.0);
13201 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
13202
13203 /* set compiled values of dynamic vector attributes */
13204 ssSetNumNonsampledZCs(childS, 0);
13205
13206 /* Update connectivity flags for each port */
13207 _ssSetInputPortConnected(childS, 0, 1);
13208 _ssSetOutputPortConnected(childS, 0, 1);
13209 _ssSetOutputPortBeingMerged(childS, 0, 0);
13210
13211 /* Update the BufferDstPort flags for each input port */
13212 _ssSetInputPortBufferDstPort(childS, 0, -1);
13213
13214 /* Instance data for generated S-Function: Res180 */
13215 {
13216 SimStruct *rts = childS;
13217
13218#include "Res180_sfcn_rtw/Res180_sid.h"
13219
13220 }
13221 }
13222
13223 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S144>/Generated S-Function1 (SaturationLimiter_sf) */
13224 {
13225 SimStruct *childS = ssGetSFunction(rts, 73);
13226
13227 /* timing info */
13228 static time_T sfcnPeriod[1];
13229 static time_T sfcnOffset[1];
13230 static int_T sfcnTsMap[1];
13231 (void) memset((void*)sfcnPeriod, 0,
13232 sizeof(time_T)*1);
13233 (void) memset((void*)sfcnOffset, 0,
13234 sizeof(time_T)*1);
13235 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
13236 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
13237 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
13238
13239 /* Set up the mdlInfo pointer */
13240# ifdef USE_RTMODEL
13241
13242 {
13243 static struct _ssBlkInfo2 _blkInfo2;
13244 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
13245 ssSetBlkInfo2Ptr(childS, blkInfo2);
13246 }
13247
13248 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
13249
13250# else
13251
13252 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
13253
13254# endif /* USE_RTMODEL */
13255
13256 /* Allocate memory of model methods 2 */
13257 {
13258 static struct _ssSFcnModelMethods2 methods2;
13259 ssSetModelMethods2(childS, &methods2);
13260 }
13261
13262 /* Allocate memory of model methods 3 */
13263 {
13264 static struct _ssSFcnModelMethods3 methods3;
13265 ssSetModelMethods3(childS, &methods3);
13266 }
13267
13268 /* Allocate memory for states auxilliary information */
13269 {
13270 static struct _ssStatesInfo2 statesInfo2;
13271 static ssPeriodicStatesInfo periodicStatesInfo;
13272 ssSetStatesInfo2(childS, &statesInfo2);
13273 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
13274 }
13275
13276 /* inputs */
13277 {
13278 static struct _ssPortInputs inputPortInfo[3];
13279 _ssSetNumInputPorts(childS, 3);
13280 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
13281
13282 /* port 0 */
13283 {
13284 static real32_T const *sfcnUPtrs[1];
13285 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
13286 ssGetLocalBlockIO(rts))->GeneratedSFunction6_a;
13287 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
13288 _ssSetInputPortNumDimensions(childS, 0, 1);
13289 ssSetInputPortWidth(childS, 0, 1);
13290 }
13291
13292 /* port 1 */
13293 {
13294 static real32_T const *sfcnUPtrs[1];
13295 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled114;
13296 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
13297 _ssSetInputPortNumDimensions(childS, 1, 1);
13298 ssSetInputPortWidth(childS, 1, 1);
13299 }
13300
13301 /* port 2 */
13302 {
13303 static real32_T const *sfcnUPtrs[1];
13304 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled115;
13305 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
13306 _ssSetInputPortNumDimensions(childS, 2, 1);
13307 ssSetInputPortWidth(childS, 2, 1);
13308 }
13309 }
13310
13311 /* outputs */
13312 {
13313 static struct _ssPortOutputs outputPortInfo[1];
13314 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
13315 _ssSetNumOutputPorts(childS, 1);
13316
13317 /* port 0 */
13318 {
13319 _ssSetOutputPortNumDimensions(childS, 0, 1);
13320 ssSetOutputPortWidth(childS, 0, 1);
13321 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
13322 *) ssGetLocalBlockIO(rts))->GeneratedSFunction1_l1));
13323 }
13324 }
13325
13326 /* path info */
13327 _ssSetModelName(childS, "SaturationLimiter_sf");
13328 _ssSetPath(childS,
13329 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/PsdLControl/Saturation Limiter1/Generated S-Function1");
13330 if (ssGetRTModel(rts) == (NULL)) {
13331 _ssSetParentSS(childS, rts);
13332 _ssSetRootSS(childS, ssGetRootSS(rts));
13333 } else {
13334 ssSetRTModel(childS,ssGetRTModel(rts));
13335 _ssSetParentSS(childS, (NULL));
13336 _ssSetRootSS(childS, childS);
13337 }
13338
13339 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
13340
13341 /* registration */
13342 SaturationLimiter_sf(childS);
13343 sfcnInitializeSizes(childS);
13344 sfcnInitializeSampleTimes(childS);
13345
13346 /* adjust sample time */
13347 ssSetSampleTime(childS, 0, 0.0);
13348 ssSetOffsetTime(childS, 0, 0.0);
13349 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
13350
13351 /* set compiled values of dynamic vector attributes */
13352 ssSetNumNonsampledZCs(childS, 0);
13353
13354 /* Update connectivity flags for each port */
13355 _ssSetInputPortConnected(childS, 0, 1);
13356 _ssSetInputPortConnected(childS, 1, 1);
13357 _ssSetInputPortConnected(childS, 2, 1);
13358 _ssSetOutputPortConnected(childS, 0, 1);
13359 _ssSetOutputPortBeingMerged(childS, 0, 0);
13360
13361 /* Update the BufferDstPort flags for each input port */
13362 _ssSetInputPortBufferDstPort(childS, 0, -1);
13363 _ssSetInputPortBufferDstPort(childS, 1, -1);
13364 _ssSetInputPortBufferDstPort(childS, 2, -1);
13365
13366 /* Instance data for generated S-Function: SaturationLimiter */
13367 {
13368 SimStruct *rts = childS;
13369
13370#include "SaturationLimiter_sfcn_rtw/SaturationLimiter_sid.h"
13371
13372 }
13373 }
13374
13375 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S148>/Generated S-Function (Gain_sf) */
13376 {
13377 SimStruct *childS = ssGetSFunction(rts, 74);
13378
13379 /* timing info */
13380 static time_T sfcnPeriod[1];
13381 static time_T sfcnOffset[1];
13382 static int_T sfcnTsMap[1];
13383 (void) memset((void*)sfcnPeriod, 0,
13384 sizeof(time_T)*1);
13385 (void) memset((void*)sfcnOffset, 0,
13386 sizeof(time_T)*1);
13387 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
13388 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
13389 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
13390
13391 /* Set up the mdlInfo pointer */
13392# ifdef USE_RTMODEL
13393
13394 {
13395 static struct _ssBlkInfo2 _blkInfo2;
13396 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
13397 ssSetBlkInfo2Ptr(childS, blkInfo2);
13398 }
13399
13400 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
13401
13402# else
13403
13404 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
13405
13406# endif /* USE_RTMODEL */
13407
13408 /* Allocate memory of model methods 2 */
13409 {
13410 static struct _ssSFcnModelMethods2 methods2;
13411 ssSetModelMethods2(childS, &methods2);
13412 }
13413
13414 /* Allocate memory of model methods 3 */
13415 {
13416 static struct _ssSFcnModelMethods3 methods3;
13417 ssSetModelMethods3(childS, &methods3);
13418 }
13419
13420 /* Allocate memory for states auxilliary information */
13421 {
13422 static struct _ssStatesInfo2 statesInfo2;
13423 static ssPeriodicStatesInfo periodicStatesInfo;
13424 ssSetStatesInfo2(childS, &statesInfo2);
13425 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
13426 }
13427
13428 /* inputs */
13429 {
13430 static struct _ssPortInputs inputPortInfo[2];
13431 _ssSetNumInputPorts(childS, 2);
13432 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
13433
13434 /* port 0 */
13435 {
13436 static real32_T const *sfcnUPtrs[1];
13437 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
13438 ssGetLocalBlockIO(rts))->GeneratedSFunction1_l1;
13439 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
13440 _ssSetInputPortNumDimensions(childS, 0, 1);
13441 ssSetInputPortWidth(childS, 0, 1);
13442 }
13443
13444 /* port 1 */
13445 {
13446 static real32_T const *sfcnUPtrs[1];
13447 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled108;
13448 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
13449 _ssSetInputPortNumDimensions(childS, 1, 1);
13450 ssSetInputPortWidth(childS, 1, 1);
13451 }
13452 }
13453
13454 /* outputs */
13455 {
13456 static struct _ssPortOutputs outputPortInfo[1];
13457 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
13458 _ssSetNumOutputPorts(childS, 1);
13459
13460 /* port 0 */
13461 {
13462 _ssSetOutputPortNumDimensions(childS, 0, 1);
13463 ssSetOutputPortWidth(childS, 0, 1);
13464 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
13465 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_cv));
13466 }
13467 }
13468
13469 /* path info */
13470 _ssSetModelName(childS, "Gain_sf");
13471 _ssSetPath(childS,
13472 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/PsdLControl/gain2/Generated S-Function");
13473 if (ssGetRTModel(rts) == (NULL)) {
13474 _ssSetParentSS(childS, rts);
13475 _ssSetRootSS(childS, ssGetRootSS(rts));
13476 } else {
13477 ssSetRTModel(childS,ssGetRTModel(rts));
13478 _ssSetParentSS(childS, (NULL));
13479 _ssSetRootSS(childS, childS);
13480 }
13481
13482 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
13483
13484 /* registration */
13485 Gain_sf(childS);
13486 sfcnInitializeSizes(childS);
13487 sfcnInitializeSampleTimes(childS);
13488
13489 /* adjust sample time */
13490 ssSetSampleTime(childS, 0, 0.0);
13491 ssSetOffsetTime(childS, 0, 0.0);
13492 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
13493
13494 /* set compiled values of dynamic vector attributes */
13495 ssSetNumNonsampledZCs(childS, 0);
13496
13497 /* Update connectivity flags for each port */
13498 _ssSetInputPortConnected(childS, 0, 1);
13499 _ssSetInputPortConnected(childS, 1, 1);
13500 _ssSetOutputPortConnected(childS, 0, 1);
13501 _ssSetOutputPortBeingMerged(childS, 0, 0);
13502
13503 /* Update the BufferDstPort flags for each input port */
13504 _ssSetInputPortBufferDstPort(childS, 0, -1);
13505 _ssSetInputPortBufferDstPort(childS, 1, -1);
13506
13507 /* Instance data for generated S-Function: Gain */
13508 {
13509 SimStruct *rts = childS;
13510
13511#include "Gain_sfcn_rtw/Gain_sid.h"
13512
13513 }
13514 }
13515
13516 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S142>/Generated S-Function2 (LeadLagFilter_sf) */
13517 {
13518 SimStruct *childS = ssGetSFunction(rts, 75);
13519
13520 /* timing info */
13521 static time_T sfcnPeriod[1];
13522 static time_T sfcnOffset[1];
13523 static int_T sfcnTsMap[1];
13524 (void) memset((void*)sfcnPeriod, 0,
13525 sizeof(time_T)*1);
13526 (void) memset((void*)sfcnOffset, 0,
13527 sizeof(time_T)*1);
13528 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
13529 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
13530 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
13531
13532 /* Set up the mdlInfo pointer */
13533# ifdef USE_RTMODEL
13534
13535 {
13536 static struct _ssBlkInfo2 _blkInfo2;
13537 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
13538 ssSetBlkInfo2Ptr(childS, blkInfo2);
13539 }
13540
13541 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
13542
13543# else
13544
13545 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
13546
13547# endif /* USE_RTMODEL */
13548
13549 /* Allocate memory of model methods 2 */
13550 {
13551 static struct _ssSFcnModelMethods2 methods2;
13552 ssSetModelMethods2(childS, &methods2);
13553 }
13554
13555 /* Allocate memory of model methods 3 */
13556 {
13557 static struct _ssSFcnModelMethods3 methods3;
13558 ssSetModelMethods3(childS, &methods3);
13559 }
13560
13561 /* Allocate memory for states auxilliary information */
13562 {
13563 static struct _ssStatesInfo2 statesInfo2;
13564 static ssPeriodicStatesInfo periodicStatesInfo;
13565 ssSetStatesInfo2(childS, &statesInfo2);
13566 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
13567 }
13568
13569 /* inputs */
13570 {
13571 static struct _ssPortInputs inputPortInfo[7];
13572 _ssSetNumInputPorts(childS, 7);
13573 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
13574
13575 /* port 0 */
13576 {
13577 static real32_T const *sfcnUPtrs[1];
13578 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
13579 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReuseS;
13580 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
13581 _ssSetInputPortNumDimensions(childS, 0, 1);
13582 ssSetInputPortWidth(childS, 0, 1);
13583 }
13584
13585 /* port 1 */
13586 {
13587 static int8_T const *sfcnUPtrs[1];
13588 sfcnUPtrs[0] = (int8_T const *) &((B_AFCS_MODEL1_T *)
13589 ssGetLocalBlockIO(rts))->DataTypeConversion2_p;
13590 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
13591 _ssSetInputPortNumDimensions(childS, 1, 1);
13592 ssSetInputPortWidth(childS, 1, 1);
13593 }
13594
13595 /* port 2 */
13596 {
13597 static real32_T const *sfcnUPtrs[1];
13598 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled108;
13599 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
13600 _ssSetInputPortNumDimensions(childS, 2, 1);
13601 ssSetInputPortWidth(childS, 2, 1);
13602 }
13603
13604 /* port 3 */
13605 {
13606 static real32_T const *sfcnUPtrs[1];
13607 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled108;
13608 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
13609 _ssSetInputPortNumDimensions(childS, 3, 1);
13610 ssSetInputPortWidth(childS, 3, 1);
13611 }
13612
13613 /* port 4 */
13614 {
13615 static real32_T const *sfcnUPtrs[1];
13616 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
13617 ssGetLocalBlockIO(rts))->Sum4_i;
13618 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
13619 _ssSetInputPortNumDimensions(childS, 4, 1);
13620 ssSetInputPortWidth(childS, 4, 1);
13621 }
13622
13623 /* port 5 */
13624 {
13625 static real32_T const *sfcnUPtrs[1];
13626 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
13627 ssGetLocalBlockIO(rts))->Sum4_i;
13628 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
13629 _ssSetInputPortNumDimensions(childS, 5, 1);
13630 ssSetInputPortWidth(childS, 5, 1);
13631 }
13632
13633 /* port 6 */
13634 {
13635 static real32_T const *sfcnUPtrs[1];
13636 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
13637 ssGetLocalBlockIO(rts))->GeneratedSFunction_cv;
13638 _ssSetInputPortSignalPtrs(childS, 6, (InputPtrsType)&sfcnUPtrs[0]);
13639 _ssSetInputPortNumDimensions(childS, 6, 1);
13640 ssSetInputPortWidth(childS, 6, 1);
13641 }
13642 }
13643
13644 /* outputs */
13645 {
13646 static struct _ssPortOutputs outputPortInfo[1];
13647 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
13648 _ssSetNumOutputPorts(childS, 1);
13649
13650 /* port 0 */
13651 {
13652 _ssSetOutputPortNumDimensions(childS, 0, 1);
13653 ssSetOutputPortWidth(childS, 0, 1);
13654 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
13655 *) ssGetLocalBlockIO(rts))->GeneratedSFunction2_c));
13656 }
13657 }
13658
13659 /* path info */
13660 _ssSetModelName(childS, "LeadLagFilter_sf");
13661 _ssSetPath(childS,
13662 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/PsdLControl/Lead lag1/Generated S-Function2");
13663 if (ssGetRTModel(rts) == (NULL)) {
13664 _ssSetParentSS(childS, rts);
13665 _ssSetRootSS(childS, ssGetRootSS(rts));
13666 } else {
13667 ssSetRTModel(childS,ssGetRTModel(rts));
13668 _ssSetParentSS(childS, (NULL));
13669 _ssSetRootSS(childS, childS);
13670 }
13671
13672 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
13673
13674 /* work vectors */
13675 {
13676 static struct _ssDWorkRecord dWorkRecord[4];
13677 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
13678 ssSetSFcnDWork(childS, dWorkRecord);
13679 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
13680 _ssSetNumDWork(childS, 4);
13681
13682 /* DWORK0 */
13683 ssSetDWorkWidth(childS, 0, 1);
13684 ssSetDWorkDataType(childS, 0,SS_SINGLE);
13685 ssSetDWorkComplexSignal(childS, 0, 0);
13686 ssSetDWorkUsedAsDState(childS, 0, 1);
13687 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 206))[0]);
13688
13689 /* DWORK1 */
13690 ssSetDWorkWidth(childS, 1, 1);
13691 ssSetDWorkDataType(childS, 1,SS_SINGLE);
13692 ssSetDWorkComplexSignal(childS, 1, 0);
13693 ssSetDWorkUsedAsDState(childS, 1, 1);
13694 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 207))[0]);
13695
13696 /* DWORK2 */
13697 ssSetDWorkWidth(childS, 2, 1);
13698 ssSetDWorkDataType(childS, 2,SS_INT8);
13699 ssSetDWorkComplexSignal(childS, 2, 0);
13700 ssSetDWorkUsedAsDState(childS, 2, 1);
13701 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 433))[0]);
13702
13703 /* DWORK3 */
13704 ssSetDWorkWidth(childS, 3, 1);
13705 ssSetDWorkDataType(childS, 3,SS_INT8);
13706 ssSetDWorkComplexSignal(childS, 3, 0);
13707 ssSetDWorkUsedAsDState(childS, 3, 1);
13708 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 434))[0]);
13709 }
13710
13711 /* registration */
13712 LeadLagFilter_sf(childS);
13713 sfcnInitializeSizes(childS);
13714 sfcnInitializeSampleTimes(childS);
13715
13716 /* adjust sample time */
13717 ssSetSampleTime(childS, 0, 0.0);
13718 ssSetOffsetTime(childS, 0, 0.0);
13719 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
13720
13721 /* set compiled values of dynamic vector attributes */
13722 ssSetNumNonsampledZCs(childS, 0);
13723
13724 /* Update connectivity flags for each port */
13725 _ssSetInputPortConnected(childS, 0, 1);
13726 _ssSetInputPortConnected(childS, 1, 1);
13727 _ssSetInputPortConnected(childS, 2, 1);
13728 _ssSetInputPortConnected(childS, 3, 1);
13729 _ssSetInputPortConnected(childS, 4, 1);
13730 _ssSetInputPortConnected(childS, 5, 1);
13731 _ssSetInputPortConnected(childS, 6, 1);
13732 _ssSetOutputPortConnected(childS, 0, 1);
13733 _ssSetOutputPortBeingMerged(childS, 0, 0);
13734
13735 /* Update the BufferDstPort flags for each input port */
13736 _ssSetInputPortBufferDstPort(childS, 0, -1);
13737 _ssSetInputPortBufferDstPort(childS, 1, -1);
13738 _ssSetInputPortBufferDstPort(childS, 2, -1);
13739 _ssSetInputPortBufferDstPort(childS, 3, -1);
13740 _ssSetInputPortBufferDstPort(childS, 4, -1);
13741 _ssSetInputPortBufferDstPort(childS, 5, -1);
13742 _ssSetInputPortBufferDstPort(childS, 6, -1);
13743
13744 /* Instance data for generated S-Function: LeadLagFilter */
13745 {
13746 SimStruct *rts = childS;
13747
13748#include "LeadLagFilter_sfcn_rtw/LeadLagFilter_sid.h"
13749
13750 }
13751 }
13752
13753 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S143>/Generated S-Function1 (SaturationLimiter_sf) */
13754 {
13755 SimStruct *childS = ssGetSFunction(rts, 76);
13756
13757 /* timing info */
13758 static time_T sfcnPeriod[1];
13759 static time_T sfcnOffset[1];
13760 static int_T sfcnTsMap[1];
13761 (void) memset((void*)sfcnPeriod, 0,
13762 sizeof(time_T)*1);
13763 (void) memset((void*)sfcnOffset, 0,
13764 sizeof(time_T)*1);
13765 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
13766 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
13767 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
13768
13769 /* Set up the mdlInfo pointer */
13770# ifdef USE_RTMODEL
13771
13772 {
13773 static struct _ssBlkInfo2 _blkInfo2;
13774 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
13775 ssSetBlkInfo2Ptr(childS, blkInfo2);
13776 }
13777
13778 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
13779
13780# else
13781
13782 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
13783
13784# endif /* USE_RTMODEL */
13785
13786 /* Allocate memory of model methods 2 */
13787 {
13788 static struct _ssSFcnModelMethods2 methods2;
13789 ssSetModelMethods2(childS, &methods2);
13790 }
13791
13792 /* Allocate memory of model methods 3 */
13793 {
13794 static struct _ssSFcnModelMethods3 methods3;
13795 ssSetModelMethods3(childS, &methods3);
13796 }
13797
13798 /* Allocate memory for states auxilliary information */
13799 {
13800 static struct _ssStatesInfo2 statesInfo2;
13801 static ssPeriodicStatesInfo periodicStatesInfo;
13802 ssSetStatesInfo2(childS, &statesInfo2);
13803 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
13804 }
13805
13806 /* inputs */
13807 {
13808 static struct _ssPortInputs inputPortInfo[3];
13809 _ssSetNumInputPorts(childS, 3);
13810 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
13811
13812 /* port 0 */
13813 {
13814 static real32_T const *sfcnUPtrs[1];
13815 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
13816 ssGetLocalBlockIO(rts))->GeneratedSFunction2_c;
13817 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
13818 _ssSetInputPortNumDimensions(childS, 0, 1);
13819 ssSetInputPortWidth(childS, 0, 1);
13820 }
13821
13822 /* port 1 */
13823 {
13824 static real32_T const *sfcnUPtrs[1];
13825 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled107;
13826 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
13827 _ssSetInputPortNumDimensions(childS, 1, 1);
13828 ssSetInputPortWidth(childS, 1, 1);
13829 }
13830
13831 /* port 2 */
13832 {
13833 static real32_T const *sfcnUPtrs[1];
13834 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled119;
13835 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
13836 _ssSetInputPortNumDimensions(childS, 2, 1);
13837 ssSetInputPortWidth(childS, 2, 1);
13838 }
13839 }
13840
13841 /* outputs */
13842 {
13843 static struct _ssPortOutputs outputPortInfo[1];
13844 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
13845 _ssSetNumOutputPorts(childS, 1);
13846
13847 /* port 0 */
13848 {
13849 _ssSetOutputPortNumDimensions(childS, 0, 1);
13850 ssSetOutputPortWidth(childS, 0, 1);
13851 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
13852 *) ssGetLocalBlockIO(rts))->Saturation2_p));
13853 }
13854 }
13855
13856 /* path info */
13857 _ssSetModelName(childS, "SaturationLimiter_sf");
13858 _ssSetPath(childS,
13859 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/PsdLControl/Saturation Limiter/Generated S-Function1");
13860 if (ssGetRTModel(rts) == (NULL)) {
13861 _ssSetParentSS(childS, rts);
13862 _ssSetRootSS(childS, ssGetRootSS(rts));
13863 } else {
13864 ssSetRTModel(childS,ssGetRTModel(rts));
13865 _ssSetParentSS(childS, (NULL));
13866 _ssSetRootSS(childS, childS);
13867 }
13868
13869 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
13870
13871 /* registration */
13872 SaturationLimiter_sf(childS);
13873 sfcnInitializeSizes(childS);
13874 sfcnInitializeSampleTimes(childS);
13875
13876 /* adjust sample time */
13877 ssSetSampleTime(childS, 0, 0.0);
13878 ssSetOffsetTime(childS, 0, 0.0);
13879 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
13880
13881 /* set compiled values of dynamic vector attributes */
13882 ssSetNumNonsampledZCs(childS, 0);
13883
13884 /* Update connectivity flags for each port */
13885 _ssSetInputPortConnected(childS, 0, 1);
13886 _ssSetInputPortConnected(childS, 1, 1);
13887 _ssSetInputPortConnected(childS, 2, 1);
13888 _ssSetOutputPortConnected(childS, 0, 1);
13889 _ssSetOutputPortBeingMerged(childS, 0, 0);
13890
13891 /* Update the BufferDstPort flags for each input port */
13892 _ssSetInputPortBufferDstPort(childS, 0, -1);
13893 _ssSetInputPortBufferDstPort(childS, 1, -1);
13894 _ssSetInputPortBufferDstPort(childS, 2, -1);
13895
13896 /* Instance data for generated S-Function: SaturationLimiter */
13897 {
13898 SimStruct *rts = childS;
13899
13900#include "SaturationLimiter_sfcn_rtw/SaturationLimiter_sid.h"
13901
13902 }
13903 }
13904
13905 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S127>/Generated S-Function1 (Res180_sf) */
13906 {
13907 SimStruct *childS = ssGetSFunction(rts, 77);
13908
13909 /* timing info */
13910 static time_T sfcnPeriod[1];
13911 static time_T sfcnOffset[1];
13912 static int_T sfcnTsMap[1];
13913 (void) memset((void*)sfcnPeriod, 0,
13914 sizeof(time_T)*1);
13915 (void) memset((void*)sfcnOffset, 0,
13916 sizeof(time_T)*1);
13917 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
13918 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
13919 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
13920
13921 /* Set up the mdlInfo pointer */
13922# ifdef USE_RTMODEL
13923
13924 {
13925 static struct _ssBlkInfo2 _blkInfo2;
13926 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
13927 ssSetBlkInfo2Ptr(childS, blkInfo2);
13928 }
13929
13930 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
13931
13932# else
13933
13934 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
13935
13936# endif /* USE_RTMODEL */
13937
13938 /* Allocate memory of model methods 2 */
13939 {
13940 static struct _ssSFcnModelMethods2 methods2;
13941 ssSetModelMethods2(childS, &methods2);
13942 }
13943
13944 /* Allocate memory of model methods 3 */
13945 {
13946 static struct _ssSFcnModelMethods3 methods3;
13947 ssSetModelMethods3(childS, &methods3);
13948 }
13949
13950 /* Allocate memory for states auxilliary information */
13951 {
13952 static struct _ssStatesInfo2 statesInfo2;
13953 static ssPeriodicStatesInfo periodicStatesInfo;
13954 ssSetStatesInfo2(childS, &statesInfo2);
13955 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
13956 }
13957
13958 /* inputs */
13959 {
13960 static struct _ssPortInputs inputPortInfo[1];
13961 _ssSetNumInputPorts(childS, 1);
13962 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
13963
13964 /* port 0 */
13965 {
13966 static real32_T const *sfcnUPtrs[1];
13967 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
13968 ssGetLocalBlockIO(rts))->Sum1_ga;
13969 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
13970 _ssSetInputPortNumDimensions(childS, 0, 1);
13971 ssSetInputPortWidth(childS, 0, 1);
13972 }
13973 }
13974
13975 /* outputs */
13976 {
13977 static struct _ssPortOutputs outputPortInfo[1];
13978 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
13979 _ssSetNumOutputPorts(childS, 1);
13980
13981 /* port 0 */
13982 {
13983 _ssSetOutputPortNumDimensions(childS, 0, 1);
13984 ssSetOutputPortWidth(childS, 0, 1);
13985 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
13986 *) ssGetLocalBlockIO(rts))->GeneratedSFunction1_bh));
13987 }
13988 }
13989
13990 /* path info */
13991 _ssSetModelName(childS, "Res180_sf");
13992 _ssSetPath(childS,
13993 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/PsdLControl/Generated S-Function1");
13994 if (ssGetRTModel(rts) == (NULL)) {
13995 _ssSetParentSS(childS, rts);
13996 _ssSetRootSS(childS, ssGetRootSS(rts));
13997 } else {
13998 ssSetRTModel(childS,ssGetRTModel(rts));
13999 _ssSetParentSS(childS, (NULL));
14000 _ssSetRootSS(childS, childS);
14001 }
14002
14003 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
14004
14005 /* registration */
14006 Res180_sf(childS);
14007 sfcnInitializeSizes(childS);
14008 sfcnInitializeSampleTimes(childS);
14009
14010 /* adjust sample time */
14011 ssSetSampleTime(childS, 0, 0.0);
14012 ssSetOffsetTime(childS, 0, 0.0);
14013 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
14014
14015 /* set compiled values of dynamic vector attributes */
14016 ssSetNumNonsampledZCs(childS, 0);
14017
14018 /* Update connectivity flags for each port */
14019 _ssSetInputPortConnected(childS, 0, 1);
14020 _ssSetOutputPortConnected(childS, 0, 1);
14021 _ssSetOutputPortBeingMerged(childS, 0, 0);
14022
14023 /* Update the BufferDstPort flags for each input port */
14024 _ssSetInputPortBufferDstPort(childS, 0, -1);
14025
14026 /* Instance data for generated S-Function: Res180 */
14027 {
14028 SimStruct *rts = childS;
14029
14030#include "Res180_sfcn_rtw/Res180_sid.h"
14031
14032 }
14033 }
14034
14035 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S146>/Generated S-Function (Gain_sf) */
14036 {
14037 SimStruct *childS = ssGetSFunction(rts, 78);
14038
14039 /* timing info */
14040 static time_T sfcnPeriod[1];
14041 static time_T sfcnOffset[1];
14042 static int_T sfcnTsMap[1];
14043 (void) memset((void*)sfcnPeriod, 0,
14044 sizeof(time_T)*1);
14045 (void) memset((void*)sfcnOffset, 0,
14046 sizeof(time_T)*1);
14047 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
14048 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
14049 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
14050
14051 /* Set up the mdlInfo pointer */
14052# ifdef USE_RTMODEL
14053
14054 {
14055 static struct _ssBlkInfo2 _blkInfo2;
14056 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
14057 ssSetBlkInfo2Ptr(childS, blkInfo2);
14058 }
14059
14060 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
14061
14062# else
14063
14064 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
14065
14066# endif /* USE_RTMODEL */
14067
14068 /* Allocate memory of model methods 2 */
14069 {
14070 static struct _ssSFcnModelMethods2 methods2;
14071 ssSetModelMethods2(childS, &methods2);
14072 }
14073
14074 /* Allocate memory of model methods 3 */
14075 {
14076 static struct _ssSFcnModelMethods3 methods3;
14077 ssSetModelMethods3(childS, &methods3);
14078 }
14079
14080 /* Allocate memory for states auxilliary information */
14081 {
14082 static struct _ssStatesInfo2 statesInfo2;
14083 static ssPeriodicStatesInfo periodicStatesInfo;
14084 ssSetStatesInfo2(childS, &statesInfo2);
14085 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
14086 }
14087
14088 /* inputs */
14089 {
14090 static struct _ssPortInputs inputPortInfo[2];
14091 _ssSetNumInputPorts(childS, 2);
14092 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
14093
14094 /* port 0 */
14095 {
14096 static real32_T const *sfcnUPtrs[1];
14097 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
14098 ssGetLocalBlockIO(rts))->GeneratedSFunction1_bh;
14099 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
14100 _ssSetInputPortNumDimensions(childS, 0, 1);
14101 ssSetInputPortWidth(childS, 0, 1);
14102 }
14103
14104 /* port 1 */
14105 {
14106 static real32_T const *sfcnUPtrs[1];
14107 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled108;
14108 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
14109 _ssSetInputPortNumDimensions(childS, 1, 1);
14110 ssSetInputPortWidth(childS, 1, 1);
14111 }
14112 }
14113
14114 /* outputs */
14115 {
14116 static struct _ssPortOutputs outputPortInfo[1];
14117 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
14118 _ssSetNumOutputPorts(childS, 1);
14119
14120 /* port 0 */
14121 {
14122 _ssSetOutputPortNumDimensions(childS, 0, 1);
14123 ssSetOutputPortWidth(childS, 0, 1);
14124 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
14125 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_ma));
14126 }
14127 }
14128
14129 /* path info */
14130 _ssSetModelName(childS, "Gain_sf");
14131 _ssSetPath(childS,
14132 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/PsdLControl/gain/Generated S-Function");
14133 if (ssGetRTModel(rts) == (NULL)) {
14134 _ssSetParentSS(childS, rts);
14135 _ssSetRootSS(childS, ssGetRootSS(rts));
14136 } else {
14137 ssSetRTModel(childS,ssGetRTModel(rts));
14138 _ssSetParentSS(childS, (NULL));
14139 _ssSetRootSS(childS, childS);
14140 }
14141
14142 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
14143
14144 /* registration */
14145 Gain_sf(childS);
14146 sfcnInitializeSizes(childS);
14147 sfcnInitializeSampleTimes(childS);
14148
14149 /* adjust sample time */
14150 ssSetSampleTime(childS, 0, 0.0);
14151 ssSetOffsetTime(childS, 0, 0.0);
14152 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
14153
14154 /* set compiled values of dynamic vector attributes */
14155 ssSetNumNonsampledZCs(childS, 0);
14156
14157 /* Update connectivity flags for each port */
14158 _ssSetInputPortConnected(childS, 0, 1);
14159 _ssSetInputPortConnected(childS, 1, 1);
14160 _ssSetOutputPortConnected(childS, 0, 1);
14161 _ssSetOutputPortBeingMerged(childS, 0, 0);
14162
14163 /* Update the BufferDstPort flags for each input port */
14164 _ssSetInputPortBufferDstPort(childS, 0, -1);
14165 _ssSetInputPortBufferDstPort(childS, 1, -1);
14166
14167 /* Instance data for generated S-Function: Gain */
14168 {
14169 SimStruct *rts = childS;
14170
14171#include "Gain_sfcn_rtw/Gain_sid.h"
14172
14173 }
14174 }
14175
14176 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S147>/Generated S-Function (Gain_sf) */
14177 {
14178 SimStruct *childS = ssGetSFunction(rts, 79);
14179
14180 /* timing info */
14181 static time_T sfcnPeriod[1];
14182 static time_T sfcnOffset[1];
14183 static int_T sfcnTsMap[1];
14184 (void) memset((void*)sfcnPeriod, 0,
14185 sizeof(time_T)*1);
14186 (void) memset((void*)sfcnOffset, 0,
14187 sizeof(time_T)*1);
14188 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
14189 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
14190 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
14191
14192 /* Set up the mdlInfo pointer */
14193# ifdef USE_RTMODEL
14194
14195 {
14196 static struct _ssBlkInfo2 _blkInfo2;
14197 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
14198 ssSetBlkInfo2Ptr(childS, blkInfo2);
14199 }
14200
14201 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
14202
14203# else
14204
14205 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
14206
14207# endif /* USE_RTMODEL */
14208
14209 /* Allocate memory of model methods 2 */
14210 {
14211 static struct _ssSFcnModelMethods2 methods2;
14212 ssSetModelMethods2(childS, &methods2);
14213 }
14214
14215 /* Allocate memory of model methods 3 */
14216 {
14217 static struct _ssSFcnModelMethods3 methods3;
14218 ssSetModelMethods3(childS, &methods3);
14219 }
14220
14221 /* Allocate memory for states auxilliary information */
14222 {
14223 static struct _ssStatesInfo2 statesInfo2;
14224 static ssPeriodicStatesInfo periodicStatesInfo;
14225 ssSetStatesInfo2(childS, &statesInfo2);
14226 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
14227 }
14228
14229 /* inputs */
14230 {
14231 static struct _ssPortInputs inputPortInfo[2];
14232 _ssSetNumInputPorts(childS, 2);
14233 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
14234
14235 /* port 0 */
14236 {
14237 static real32_T const *sfcnUPtrs[1];
14238 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
14239 ssGetLocalBlockIO(rts))->GeneratedSFunction_ma;
14240 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
14241 _ssSetInputPortNumDimensions(childS, 0, 1);
14242 ssSetInputPortWidth(childS, 0, 1);
14243 }
14244
14245 /* port 1 */
14246 {
14247 static real32_T const *sfcnUPtrs[1];
14248 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled116;
14249 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
14250 _ssSetInputPortNumDimensions(childS, 1, 1);
14251 ssSetInputPortWidth(childS, 1, 1);
14252 }
14253 }
14254
14255 /* outputs */
14256 {
14257 static struct _ssPortOutputs outputPortInfo[1];
14258 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
14259 _ssSetNumOutputPorts(childS, 1);
14260
14261 /* port 0 */
14262 {
14263 _ssSetOutputPortNumDimensions(childS, 0, 1);
14264 ssSetOutputPortWidth(childS, 0, 1);
14265 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
14266 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_ck));
14267 }
14268 }
14269
14270 /* path info */
14271 _ssSetModelName(childS, "Gain_sf");
14272 _ssSetPath(childS,
14273 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/PsdLControl/gain1/Generated S-Function");
14274 if (ssGetRTModel(rts) == (NULL)) {
14275 _ssSetParentSS(childS, rts);
14276 _ssSetRootSS(childS, ssGetRootSS(rts));
14277 } else {
14278 ssSetRTModel(childS,ssGetRTModel(rts));
14279 _ssSetParentSS(childS, (NULL));
14280 _ssSetRootSS(childS, childS);
14281 }
14282
14283 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
14284
14285 /* registration */
14286 Gain_sf(childS);
14287 sfcnInitializeSizes(childS);
14288 sfcnInitializeSampleTimes(childS);
14289
14290 /* adjust sample time */
14291 ssSetSampleTime(childS, 0, 0.0);
14292 ssSetOffsetTime(childS, 0, 0.0);
14293 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
14294
14295 /* set compiled values of dynamic vector attributes */
14296 ssSetNumNonsampledZCs(childS, 0);
14297
14298 /* Update connectivity flags for each port */
14299 _ssSetInputPortConnected(childS, 0, 1);
14300 _ssSetInputPortConnected(childS, 1, 1);
14301 _ssSetOutputPortConnected(childS, 0, 1);
14302 _ssSetOutputPortBeingMerged(childS, 0, 0);
14303
14304 /* Update the BufferDstPort flags for each input port */
14305 _ssSetInputPortBufferDstPort(childS, 0, -1);
14306 _ssSetInputPortBufferDstPort(childS, 1, -1);
14307
14308 /* Instance data for generated S-Function: Gain */
14309 {
14310 SimStruct *rts = childS;
14311
14312#include "Gain_sfcn_rtw/Gain_sid.h"
14313
14314 }
14315 }
14316
14317 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S140>/Generated S-Function3 (IntegratorLimited_sf) */
14318 {
14319 SimStruct *childS = ssGetSFunction(rts, 80);
14320
14321 /* timing info */
14322 static time_T sfcnPeriod[1];
14323 static time_T sfcnOffset[1];
14324 static int_T sfcnTsMap[1];
14325 (void) memset((void*)sfcnPeriod, 0,
14326 sizeof(time_T)*1);
14327 (void) memset((void*)sfcnOffset, 0,
14328 sizeof(time_T)*1);
14329 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
14330 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
14331 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
14332
14333 /* Set up the mdlInfo pointer */
14334# ifdef USE_RTMODEL
14335
14336 {
14337 static struct _ssBlkInfo2 _blkInfo2;
14338 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
14339 ssSetBlkInfo2Ptr(childS, blkInfo2);
14340 }
14341
14342 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
14343
14344# else
14345
14346 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
14347
14348# endif /* USE_RTMODEL */
14349
14350 /* Allocate memory of model methods 2 */
14351 {
14352 static struct _ssSFcnModelMethods2 methods2;
14353 ssSetModelMethods2(childS, &methods2);
14354 }
14355
14356 /* Allocate memory of model methods 3 */
14357 {
14358 static struct _ssSFcnModelMethods3 methods3;
14359 ssSetModelMethods3(childS, &methods3);
14360 }
14361
14362 /* Allocate memory for states auxilliary information */
14363 {
14364 static struct _ssStatesInfo2 statesInfo2;
14365 static ssPeriodicStatesInfo periodicStatesInfo;
14366 ssSetStatesInfo2(childS, &statesInfo2);
14367 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
14368 }
14369
14370 /* inputs */
14371 {
14372 static struct _ssPortInputs inputPortInfo[7];
14373 _ssSetNumInputPorts(childS, 7);
14374 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
14375
14376 /* port 0 */
14377 {
14378 static real32_T const *sfcnUPtrs[1];
14379 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
14380 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReuseS;
14381 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
14382 _ssSetInputPortNumDimensions(childS, 0, 1);
14383 ssSetInputPortWidth(childS, 0, 1);
14384 }
14385
14386 /* port 1 */
14387 {
14388 static int8_T const *sfcnUPtrs[1];
14389 sfcnUPtrs[0] = (int8_T const *) &((B_AFCS_MODEL1_T *)
14390 ssGetLocalBlockIO(rts))->DataTypeConversion2_p;
14391 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
14392 _ssSetInputPortNumDimensions(childS, 1, 1);
14393 ssSetInputPortWidth(childS, 1, 1);
14394 }
14395
14396 /* port 2 */
14397 {
14398 static real32_T const *sfcnUPtrs[1];
14399 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled106;
14400 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
14401 _ssSetInputPortNumDimensions(childS, 2, 1);
14402 ssSetInputPortWidth(childS, 2, 1);
14403 }
14404
14405 /* port 3 */
14406 {
14407 static real32_T const *sfcnUPtrs[1];
14408 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled106;
14409 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
14410 _ssSetInputPortNumDimensions(childS, 3, 1);
14411 ssSetInputPortWidth(childS, 3, 1);
14412 }
14413
14414 /* port 4 */
14415 {
14416 static real32_T const *sfcnUPtrs[1];
14417 sfcnUPtrs[0] = (real32_T const *)
14418 &AFCS_MODEL1_ConstP.Constant29_Value;
14419 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
14420 _ssSetInputPortNumDimensions(childS, 4, 1);
14421 ssSetInputPortWidth(childS, 4, 1);
14422 }
14423
14424 /* port 5 */
14425 {
14426 static real32_T const *sfcnUPtrs[1];
14427 sfcnUPtrs[0] = (real32_T const *)
14428 &AFCS_MODEL1_ConstP.Constant30_Value;
14429 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
14430 _ssSetInputPortNumDimensions(childS, 5, 1);
14431 ssSetInputPortWidth(childS, 5, 1);
14432 }
14433
14434 /* port 6 */
14435 {
14436 static real32_T const *sfcnUPtrs[1];
14437 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
14438 ssGetLocalBlockIO(rts))->GeneratedSFunction_ck;
14439 _ssSetInputPortSignalPtrs(childS, 6, (InputPtrsType)&sfcnUPtrs[0]);
14440 _ssSetInputPortNumDimensions(childS, 6, 1);
14441 ssSetInputPortWidth(childS, 6, 1);
14442 }
14443 }
14444
14445 /* outputs */
14446 {
14447 static struct _ssPortOutputs outputPortInfo[1];
14448 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
14449 _ssSetNumOutputPorts(childS, 1);
14450
14451 /* port 0 */
14452 {
14453 _ssSetOutputPortNumDimensions(childS, 0, 1);
14454 ssSetOutputPortWidth(childS, 0, 1);
14455 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
14456 *) ssGetLocalBlockIO(rts))->Saturation2_p));
14457 }
14458 }
14459
14460 /* path info */
14461 _ssSetModelName(childS, "IntegratorLimited_sf");
14462 _ssSetPath(childS,
14463 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/PsdLControl/Integrator Limited/Generated S-Function3");
14464 if (ssGetRTModel(rts) == (NULL)) {
14465 _ssSetParentSS(childS, rts);
14466 _ssSetRootSS(childS, ssGetRootSS(rts));
14467 } else {
14468 ssSetRTModel(childS,ssGetRTModel(rts));
14469 _ssSetParentSS(childS, (NULL));
14470 _ssSetRootSS(childS, childS);
14471 }
14472
14473 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
14474
14475 /* work vectors */
14476 {
14477 static struct _ssDWorkRecord dWorkRecord[4];
14478 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
14479 ssSetSFcnDWork(childS, dWorkRecord);
14480 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
14481 _ssSetNumDWork(childS, 4);
14482
14483 /* DWORK0 */
14484 ssSetDWorkWidth(childS, 0, 1);
14485 ssSetDWorkDataType(childS, 0,SS_SINGLE);
14486 ssSetDWorkComplexSignal(childS, 0, 0);
14487 ssSetDWorkUsedAsDState(childS, 0, 1);
14488 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 208))[0]);
14489
14490 /* DWORK1 */
14491 ssSetDWorkWidth(childS, 1, 1);
14492 ssSetDWorkDataType(childS, 1,SS_SINGLE);
14493 ssSetDWorkComplexSignal(childS, 1, 0);
14494 ssSetDWorkUsedAsDState(childS, 1, 1);
14495 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 209))[0]);
14496
14497 /* DWORK2 */
14498 ssSetDWorkWidth(childS, 2, 1);
14499 ssSetDWorkDataType(childS, 2,SS_INT8);
14500 ssSetDWorkComplexSignal(childS, 2, 0);
14501 ssSetDWorkUsedAsDState(childS, 2, 1);
14502 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 435))[0]);
14503
14504 /* DWORK3 */
14505 ssSetDWorkWidth(childS, 3, 1);
14506 ssSetDWorkDataType(childS, 3,SS_INT8);
14507 ssSetDWorkComplexSignal(childS, 3, 0);
14508 ssSetDWorkUsedAsDState(childS, 3, 1);
14509 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 436))[0]);
14510 }
14511
14512 /* registration */
14513 IntegratorLimited_sf(childS);
14514 sfcnInitializeSizes(childS);
14515 sfcnInitializeSampleTimes(childS);
14516
14517 /* adjust sample time */
14518 ssSetSampleTime(childS, 0, 0.0);
14519 ssSetOffsetTime(childS, 0, 0.0);
14520 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
14521
14522 /* set compiled values of dynamic vector attributes */
14523 ssSetNumNonsampledZCs(childS, 0);
14524
14525 /* Update connectivity flags for each port */
14526 _ssSetInputPortConnected(childS, 0, 1);
14527 _ssSetInputPortConnected(childS, 1, 1);
14528 _ssSetInputPortConnected(childS, 2, 1);
14529 _ssSetInputPortConnected(childS, 3, 1);
14530 _ssSetInputPortConnected(childS, 4, 1);
14531 _ssSetInputPortConnected(childS, 5, 1);
14532 _ssSetInputPortConnected(childS, 6, 1);
14533 _ssSetOutputPortConnected(childS, 0, 1);
14534 _ssSetOutputPortBeingMerged(childS, 0, 0);
14535
14536 /* Update the BufferDstPort flags for each input port */
14537 _ssSetInputPortBufferDstPort(childS, 0, -1);
14538 _ssSetInputPortBufferDstPort(childS, 1, -1);
14539 _ssSetInputPortBufferDstPort(childS, 2, -1);
14540 _ssSetInputPortBufferDstPort(childS, 3, -1);
14541 _ssSetInputPortBufferDstPort(childS, 4, -1);
14542 _ssSetInputPortBufferDstPort(childS, 5, -1);
14543 _ssSetInputPortBufferDstPort(childS, 6, -1);
14544
14545 /* Instance data for generated S-Function: IntegratorLimited */
14546 {
14547 SimStruct *rts = childS;
14548
14549#include "IntegratorLimited_sfcn_rtw/IntegratorLimited_sid.h"
14550
14551 }
14552 }
14553
14554 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S141>/Generated S-Function2 (LeadLagFilter_sf) */
14555 {
14556 SimStruct *childS = ssGetSFunction(rts, 81);
14557
14558 /* timing info */
14559 static time_T sfcnPeriod[1];
14560 static time_T sfcnOffset[1];
14561 static int_T sfcnTsMap[1];
14562 (void) memset((void*)sfcnPeriod, 0,
14563 sizeof(time_T)*1);
14564 (void) memset((void*)sfcnOffset, 0,
14565 sizeof(time_T)*1);
14566 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
14567 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
14568 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
14569
14570 /* Set up the mdlInfo pointer */
14571# ifdef USE_RTMODEL
14572
14573 {
14574 static struct _ssBlkInfo2 _blkInfo2;
14575 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
14576 ssSetBlkInfo2Ptr(childS, blkInfo2);
14577 }
14578
14579 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
14580
14581# else
14582
14583 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
14584
14585# endif /* USE_RTMODEL */
14586
14587 /* Allocate memory of model methods 2 */
14588 {
14589 static struct _ssSFcnModelMethods2 methods2;
14590 ssSetModelMethods2(childS, &methods2);
14591 }
14592
14593 /* Allocate memory of model methods 3 */
14594 {
14595 static struct _ssSFcnModelMethods3 methods3;
14596 ssSetModelMethods3(childS, &methods3);
14597 }
14598
14599 /* Allocate memory for states auxilliary information */
14600 {
14601 static struct _ssStatesInfo2 statesInfo2;
14602 static ssPeriodicStatesInfo periodicStatesInfo;
14603 ssSetStatesInfo2(childS, &statesInfo2);
14604 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
14605 }
14606
14607 /* inputs */
14608 {
14609 static struct _ssPortInputs inputPortInfo[7];
14610 _ssSetNumInputPorts(childS, 7);
14611 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
14612
14613 /* port 0 */
14614 {
14615 static real32_T const *sfcnUPtrs[1];
14616 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
14617 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReuseS;
14618 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
14619 _ssSetInputPortNumDimensions(childS, 0, 1);
14620 ssSetInputPortWidth(childS, 0, 1);
14621 }
14622
14623 /* port 1 */
14624 {
14625 static int8_T const *sfcnUPtrs[1];
14626 sfcnUPtrs[0] = (int8_T const *) &((B_AFCS_MODEL1_T *)
14627 ssGetLocalBlockIO(rts))->DataTypeConversion2_p;
14628 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
14629 _ssSetInputPortNumDimensions(childS, 1, 1);
14630 ssSetInputPortWidth(childS, 1, 1);
14631 }
14632
14633 /* port 2 */
14634 {
14635 static real32_T const *sfcnUPtrs[1];
14636 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled108;
14637 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
14638 _ssSetInputPortNumDimensions(childS, 2, 1);
14639 ssSetInputPortWidth(childS, 2, 1);
14640 }
14641
14642 /* port 3 */
14643 {
14644 static real32_T const *sfcnUPtrs[1];
14645 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled108;
14646 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
14647 _ssSetInputPortNumDimensions(childS, 3, 1);
14648 ssSetInputPortWidth(childS, 3, 1);
14649 }
14650
14651 /* port 4 */
14652 {
14653 static real32_T const *sfcnUPtrs[1];
14654 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
14655 ssGetLocalBlockIO(rts))->Switch_bg;
14656 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
14657 _ssSetInputPortNumDimensions(childS, 4, 1);
14658 ssSetInputPortWidth(childS, 4, 1);
14659 }
14660
14661 /* port 5 */
14662 {
14663 static real32_T const *sfcnUPtrs[1];
14664 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
14665 ssGetLocalBlockIO(rts))->Switch_bg;
14666 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
14667 _ssSetInputPortNumDimensions(childS, 5, 1);
14668 ssSetInputPortWidth(childS, 5, 1);
14669 }
14670
14671 /* port 6 */
14672 {
14673 static real32_T const *sfcnUPtrs[1];
14674 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
14675 ssGetLocalBlockIO(rts))->Sum_mz;
14676 _ssSetInputPortSignalPtrs(childS, 6, (InputPtrsType)&sfcnUPtrs[0]);
14677 _ssSetInputPortNumDimensions(childS, 6, 1);
14678 ssSetInputPortWidth(childS, 6, 1);
14679 }
14680 }
14681
14682 /* outputs */
14683 {
14684 static struct _ssPortOutputs outputPortInfo[1];
14685 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
14686 _ssSetNumOutputPorts(childS, 1);
14687
14688 /* port 0 */
14689 {
14690 _ssSetOutputPortNumDimensions(childS, 0, 1);
14691 ssSetOutputPortWidth(childS, 0, 1);
14692 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
14693 *) ssGetLocalBlockIO(rts))->GeneratedSFunction2_n));
14694 }
14695 }
14696
14697 /* path info */
14698 _ssSetModelName(childS, "LeadLagFilter_sf");
14699 _ssSetPath(childS,
14700 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/PsdLControl/Lead lag/Generated S-Function2");
14701 if (ssGetRTModel(rts) == (NULL)) {
14702 _ssSetParentSS(childS, rts);
14703 _ssSetRootSS(childS, ssGetRootSS(rts));
14704 } else {
14705 ssSetRTModel(childS,ssGetRTModel(rts));
14706 _ssSetParentSS(childS, (NULL));
14707 _ssSetRootSS(childS, childS);
14708 }
14709
14710 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
14711
14712 /* work vectors */
14713 {
14714 static struct _ssDWorkRecord dWorkRecord[4];
14715 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
14716 ssSetSFcnDWork(childS, dWorkRecord);
14717 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
14718 _ssSetNumDWork(childS, 4);
14719
14720 /* DWORK0 */
14721 ssSetDWorkWidth(childS, 0, 1);
14722 ssSetDWorkDataType(childS, 0,SS_SINGLE);
14723 ssSetDWorkComplexSignal(childS, 0, 0);
14724 ssSetDWorkUsedAsDState(childS, 0, 1);
14725 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 210))[0]);
14726
14727 /* DWORK1 */
14728 ssSetDWorkWidth(childS, 1, 1);
14729 ssSetDWorkDataType(childS, 1,SS_SINGLE);
14730 ssSetDWorkComplexSignal(childS, 1, 0);
14731 ssSetDWorkUsedAsDState(childS, 1, 1);
14732 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 211))[0]);
14733
14734 /* DWORK2 */
14735 ssSetDWorkWidth(childS, 2, 1);
14736 ssSetDWorkDataType(childS, 2,SS_INT8);
14737 ssSetDWorkComplexSignal(childS, 2, 0);
14738 ssSetDWorkUsedAsDState(childS, 2, 1);
14739 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 437))[0]);
14740
14741 /* DWORK3 */
14742 ssSetDWorkWidth(childS, 3, 1);
14743 ssSetDWorkDataType(childS, 3,SS_INT8);
14744 ssSetDWorkComplexSignal(childS, 3, 0);
14745 ssSetDWorkUsedAsDState(childS, 3, 1);
14746 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 438))[0]);
14747 }
14748
14749 /* registration */
14750 LeadLagFilter_sf(childS);
14751 sfcnInitializeSizes(childS);
14752 sfcnInitializeSampleTimes(childS);
14753
14754 /* adjust sample time */
14755 ssSetSampleTime(childS, 0, 0.0);
14756 ssSetOffsetTime(childS, 0, 0.0);
14757 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
14758
14759 /* set compiled values of dynamic vector attributes */
14760 ssSetNumNonsampledZCs(childS, 0);
14761
14762 /* Update connectivity flags for each port */
14763 _ssSetInputPortConnected(childS, 0, 1);
14764 _ssSetInputPortConnected(childS, 1, 1);
14765 _ssSetInputPortConnected(childS, 2, 1);
14766 _ssSetInputPortConnected(childS, 3, 1);
14767 _ssSetInputPortConnected(childS, 4, 1);
14768 _ssSetInputPortConnected(childS, 5, 1);
14769 _ssSetInputPortConnected(childS, 6, 1);
14770 _ssSetOutputPortConnected(childS, 0, 1);
14771 _ssSetOutputPortBeingMerged(childS, 0, 0);
14772
14773 /* Update the BufferDstPort flags for each input port */
14774 _ssSetInputPortBufferDstPort(childS, 0, -1);
14775 _ssSetInputPortBufferDstPort(childS, 1, -1);
14776 _ssSetInputPortBufferDstPort(childS, 2, -1);
14777 _ssSetInputPortBufferDstPort(childS, 3, -1);
14778 _ssSetInputPortBufferDstPort(childS, 4, -1);
14779 _ssSetInputPortBufferDstPort(childS, 5, -1);
14780 _ssSetInputPortBufferDstPort(childS, 6, -1);
14781
14782 /* Instance data for generated S-Function: LeadLagFilter */
14783 {
14784 SimStruct *rts = childS;
14785
14786#include "LeadLagFilter_sfcn_rtw/LeadLagFilter_sid.h"
14787
14788 }
14789 }
14790
14791 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S139>/Generated S-Function4 (LagFilter_sf) */
14792 {
14793 SimStruct *childS = ssGetSFunction(rts, 82);
14794
14795 /* timing info */
14796 static time_T sfcnPeriod[1];
14797 static time_T sfcnOffset[1];
14798 static int_T sfcnTsMap[1];
14799 (void) memset((void*)sfcnPeriod, 0,
14800 sizeof(time_T)*1);
14801 (void) memset((void*)sfcnOffset, 0,
14802 sizeof(time_T)*1);
14803 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
14804 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
14805 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
14806
14807 /* Set up the mdlInfo pointer */
14808# ifdef USE_RTMODEL
14809
14810 {
14811 static struct _ssBlkInfo2 _blkInfo2;
14812 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
14813 ssSetBlkInfo2Ptr(childS, blkInfo2);
14814 }
14815
14816 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
14817
14818# else
14819
14820 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
14821
14822# endif /* USE_RTMODEL */
14823
14824 /* Allocate memory of model methods 2 */
14825 {
14826 static struct _ssSFcnModelMethods2 methods2;
14827 ssSetModelMethods2(childS, &methods2);
14828 }
14829
14830 /* Allocate memory of model methods 3 */
14831 {
14832 static struct _ssSFcnModelMethods3 methods3;
14833 ssSetModelMethods3(childS, &methods3);
14834 }
14835
14836 /* Allocate memory for states auxilliary information */
14837 {
14838 static struct _ssStatesInfo2 statesInfo2;
14839 static ssPeriodicStatesInfo periodicStatesInfo;
14840 ssSetStatesInfo2(childS, &statesInfo2);
14841 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
14842 }
14843
14844 /* inputs */
14845 {
14846 static struct _ssPortInputs inputPortInfo[6];
14847 _ssSetNumInputPorts(childS, 6);
14848 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
14849
14850 /* port 0 */
14851 {
14852 static real32_T const *sfcnUPtrs[1];
14853 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
14854 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReuseS;
14855 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
14856 _ssSetInputPortNumDimensions(childS, 0, 1);
14857 ssSetInputPortWidth(childS, 0, 1);
14858 }
14859
14860 /* port 1 */
14861 {
14862 static int8_T const *sfcnUPtrs[1];
14863 sfcnUPtrs[0] = (int8_T const *) &((B_AFCS_MODEL1_T *)
14864 ssGetLocalBlockIO(rts))->DataTypeConversion2_p;
14865 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
14866 _ssSetInputPortNumDimensions(childS, 1, 1);
14867 ssSetInputPortWidth(childS, 1, 1);
14868 }
14869
14870 /* port 2 */
14871 {
14872 static real32_T const *sfcnUPtrs[1];
14873 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled107;
14874 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
14875 _ssSetInputPortNumDimensions(childS, 2, 1);
14876 ssSetInputPortWidth(childS, 2, 1);
14877 }
14878
14879 /* port 3 */
14880 {
14881 static real32_T const *sfcnUPtrs[1];
14882 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
14883 ssGetLocalBlockIO(rts))->Switch_bg;
14884 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
14885 _ssSetInputPortNumDimensions(childS, 3, 1);
14886 ssSetInputPortWidth(childS, 3, 1);
14887 }
14888
14889 /* port 4 */
14890 {
14891 static real32_T const *sfcnUPtrs[1];
14892 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
14893 ssGetLocalBlockIO(rts))->Switch_bg;
14894 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
14895 _ssSetInputPortNumDimensions(childS, 4, 1);
14896 ssSetInputPortWidth(childS, 4, 1);
14897 }
14898
14899 /* port 5 */
14900 {
14901 static real32_T const *sfcnUPtrs[1];
14902 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
14903 ssGetLocalBlockIO(rts))->GeneratedSFunction2_n;
14904 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
14905 _ssSetInputPortNumDimensions(childS, 5, 1);
14906 ssSetInputPortWidth(childS, 5, 1);
14907 }
14908 }
14909
14910 /* outputs */
14911 {
14912 static struct _ssPortOutputs outputPortInfo[1];
14913 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
14914 _ssSetNumOutputPorts(childS, 1);
14915
14916 /* port 0 */
14917 {
14918 _ssSetOutputPortNumDimensions(childS, 0, 1);
14919 ssSetOutputPortWidth(childS, 0, 1);
14920 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
14921 *) ssGetLocalBlockIO(rts))->GeneratedSFunction4_cg));
14922 }
14923 }
14924
14925 /* path info */
14926 _ssSetModelName(childS, "LagFilter_sf");
14927 _ssSetPath(childS,
14928 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/PsdLControl/ lag filter/Generated S-Function4");
14929 if (ssGetRTModel(rts) == (NULL)) {
14930 _ssSetParentSS(childS, rts);
14931 _ssSetRootSS(childS, ssGetRootSS(rts));
14932 } else {
14933 ssSetRTModel(childS,ssGetRTModel(rts));
14934 _ssSetParentSS(childS, (NULL));
14935 _ssSetRootSS(childS, childS);
14936 }
14937
14938 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
14939
14940 /* work vectors */
14941 {
14942 static struct _ssDWorkRecord dWorkRecord[4];
14943 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
14944 ssSetSFcnDWork(childS, dWorkRecord);
14945 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
14946 _ssSetNumDWork(childS, 4);
14947
14948 /* DWORK0 */
14949 ssSetDWorkWidth(childS, 0, 1);
14950 ssSetDWorkDataType(childS, 0,SS_SINGLE);
14951 ssSetDWorkComplexSignal(childS, 0, 0);
14952 ssSetDWorkUsedAsDState(childS, 0, 1);
14953 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 212))[0]);
14954
14955 /* DWORK1 */
14956 ssSetDWorkWidth(childS, 1, 1);
14957 ssSetDWorkDataType(childS, 1,SS_SINGLE);
14958 ssSetDWorkComplexSignal(childS, 1, 0);
14959 ssSetDWorkUsedAsDState(childS, 1, 1);
14960 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 213))[0]);
14961
14962 /* DWORK2 */
14963 ssSetDWorkWidth(childS, 2, 1);
14964 ssSetDWorkDataType(childS, 2,SS_INT8);
14965 ssSetDWorkComplexSignal(childS, 2, 0);
14966 ssSetDWorkUsedAsDState(childS, 2, 1);
14967 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 439))[0]);
14968
14969 /* DWORK3 */
14970 ssSetDWorkWidth(childS, 3, 1);
14971 ssSetDWorkDataType(childS, 3,SS_INT8);
14972 ssSetDWorkComplexSignal(childS, 3, 0);
14973 ssSetDWorkUsedAsDState(childS, 3, 1);
14974 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 440))[0]);
14975 }
14976
14977 /* registration */
14978 LagFilter_sf(childS);
14979 sfcnInitializeSizes(childS);
14980 sfcnInitializeSampleTimes(childS);
14981
14982 /* adjust sample time */
14983 ssSetSampleTime(childS, 0, 0.0);
14984 ssSetOffsetTime(childS, 0, 0.0);
14985 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
14986
14987 /* set compiled values of dynamic vector attributes */
14988 ssSetNumNonsampledZCs(childS, 0);
14989
14990 /* Update connectivity flags for each port */
14991 _ssSetInputPortConnected(childS, 0, 1);
14992 _ssSetInputPortConnected(childS, 1, 1);
14993 _ssSetInputPortConnected(childS, 2, 1);
14994 _ssSetInputPortConnected(childS, 3, 1);
14995 _ssSetInputPortConnected(childS, 4, 1);
14996 _ssSetInputPortConnected(childS, 5, 1);
14997 _ssSetOutputPortConnected(childS, 0, 1);
14998 _ssSetOutputPortBeingMerged(childS, 0, 0);
14999
15000 /* Update the BufferDstPort flags for each input port */
15001 _ssSetInputPortBufferDstPort(childS, 0, -1);
15002 _ssSetInputPortBufferDstPort(childS, 1, -1);
15003 _ssSetInputPortBufferDstPort(childS, 2, -1);
15004 _ssSetInputPortBufferDstPort(childS, 3, -1);
15005 _ssSetInputPortBufferDstPort(childS, 4, -1);
15006 _ssSetInputPortBufferDstPort(childS, 5, -1);
15007
15008 /* Instance data for generated S-Function: LagFilter */
15009 {
15010 SimStruct *rts = childS;
15011
15012#include "LagFilter_sfcn_rtw/LagFilter_sid.h"
15013
15014 }
15015 }
15016
15017 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S164>/Generated S-Function1 (SaturationLimiter_sf) */
15018 {
15019 SimStruct *childS = ssGetSFunction(rts, 83);
15020
15021 /* timing info */
15022 static time_T sfcnPeriod[1];
15023 static time_T sfcnOffset[1];
15024 static int_T sfcnTsMap[1];
15025 (void) memset((void*)sfcnPeriod, 0,
15026 sizeof(time_T)*1);
15027 (void) memset((void*)sfcnOffset, 0,
15028 sizeof(time_T)*1);
15029 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
15030 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
15031 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
15032
15033 /* Set up the mdlInfo pointer */
15034# ifdef USE_RTMODEL
15035
15036 {
15037 static struct _ssBlkInfo2 _blkInfo2;
15038 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
15039 ssSetBlkInfo2Ptr(childS, blkInfo2);
15040 }
15041
15042 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
15043
15044# else
15045
15046 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
15047
15048# endif /* USE_RTMODEL */
15049
15050 /* Allocate memory of model methods 2 */
15051 {
15052 static struct _ssSFcnModelMethods2 methods2;
15053 ssSetModelMethods2(childS, &methods2);
15054 }
15055
15056 /* Allocate memory of model methods 3 */
15057 {
15058 static struct _ssSFcnModelMethods3 methods3;
15059 ssSetModelMethods3(childS, &methods3);
15060 }
15061
15062 /* Allocate memory for states auxilliary information */
15063 {
15064 static struct _ssStatesInfo2 statesInfo2;
15065 static ssPeriodicStatesInfo periodicStatesInfo;
15066 ssSetStatesInfo2(childS, &statesInfo2);
15067 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
15068 }
15069
15070 /* inputs */
15071 {
15072 static struct _ssPortInputs inputPortInfo[3];
15073 _ssSetNumInputPorts(childS, 3);
15074 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
15075
15076 /* port 0 */
15077 {
15078 static real32_T const *sfcnUPtrs[1];
15079 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
15080 ssGetLocalBlockIO(rts))->Sum2_hh;
15081 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
15082 _ssSetInputPortNumDimensions(childS, 0, 1);
15083 ssSetInputPortWidth(childS, 0, 1);
15084 }
15085
15086 /* port 1 */
15087 {
15088 static real32_T const *sfcnUPtrs[1];
15089 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled120;
15090 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
15091 _ssSetInputPortNumDimensions(childS, 1, 1);
15092 ssSetInputPortWidth(childS, 1, 1);
15093 }
15094
15095 /* port 2 */
15096 {
15097 static real32_T const *sfcnUPtrs[1];
15098 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled121;
15099 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
15100 _ssSetInputPortNumDimensions(childS, 2, 1);
15101 ssSetInputPortWidth(childS, 2, 1);
15102 }
15103 }
15104
15105 /* outputs */
15106 {
15107 static struct _ssPortOutputs outputPortInfo[1];
15108 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
15109 _ssSetNumOutputPorts(childS, 1);
15110
15111 /* port 0 */
15112 {
15113 _ssSetOutputPortNumDimensions(childS, 0, 1);
15114 ssSetOutputPortWidth(childS, 0, 1);
15115 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
15116 *) ssGetLocalBlockIO(rts))->GeneratedSFunction1_n1));
15117 }
15118 }
15119
15120 /* path info */
15121 _ssSetModelName(childS, "SaturationLimiter_sf");
15122 _ssSetPath(childS,
15123 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/RwyLControl/Saturation Limiter3/Generated S-Function1");
15124 if (ssGetRTModel(rts) == (NULL)) {
15125 _ssSetParentSS(childS, rts);
15126 _ssSetRootSS(childS, ssGetRootSS(rts));
15127 } else {
15128 ssSetRTModel(childS,ssGetRTModel(rts));
15129 _ssSetParentSS(childS, (NULL));
15130 _ssSetRootSS(childS, childS);
15131 }
15132
15133 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
15134
15135 /* registration */
15136 SaturationLimiter_sf(childS);
15137 sfcnInitializeSizes(childS);
15138 sfcnInitializeSampleTimes(childS);
15139
15140 /* adjust sample time */
15141 ssSetSampleTime(childS, 0, 0.0);
15142 ssSetOffsetTime(childS, 0, 0.0);
15143 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
15144
15145 /* set compiled values of dynamic vector attributes */
15146 ssSetNumNonsampledZCs(childS, 0);
15147
15148 /* Update connectivity flags for each port */
15149 _ssSetInputPortConnected(childS, 0, 1);
15150 _ssSetInputPortConnected(childS, 1, 1);
15151 _ssSetInputPortConnected(childS, 2, 1);
15152 _ssSetOutputPortConnected(childS, 0, 1);
15153 _ssSetOutputPortBeingMerged(childS, 0, 0);
15154
15155 /* Update the BufferDstPort flags for each input port */
15156 _ssSetInputPortBufferDstPort(childS, 0, -1);
15157 _ssSetInputPortBufferDstPort(childS, 1, -1);
15158 _ssSetInputPortBufferDstPort(childS, 2, -1);
15159
15160 /* Instance data for generated S-Function: SaturationLimiter */
15161 {
15162 SimStruct *rts = childS;
15163
15164#include "SaturationLimiter_sfcn_rtw/SaturationLimiter_sid.h"
15165
15166 }
15167 }
15168
15169 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S168>/Generated S-Function (Gain_sf) */
15170 {
15171 SimStruct *childS = ssGetSFunction(rts, 84);
15172
15173 /* timing info */
15174 static time_T sfcnPeriod[1];
15175 static time_T sfcnOffset[1];
15176 static int_T sfcnTsMap[1];
15177 (void) memset((void*)sfcnPeriod, 0,
15178 sizeof(time_T)*1);
15179 (void) memset((void*)sfcnOffset, 0,
15180 sizeof(time_T)*1);
15181 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
15182 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
15183 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
15184
15185 /* Set up the mdlInfo pointer */
15186# ifdef USE_RTMODEL
15187
15188 {
15189 static struct _ssBlkInfo2 _blkInfo2;
15190 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
15191 ssSetBlkInfo2Ptr(childS, blkInfo2);
15192 }
15193
15194 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
15195
15196# else
15197
15198 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
15199
15200# endif /* USE_RTMODEL */
15201
15202 /* Allocate memory of model methods 2 */
15203 {
15204 static struct _ssSFcnModelMethods2 methods2;
15205 ssSetModelMethods2(childS, &methods2);
15206 }
15207
15208 /* Allocate memory of model methods 3 */
15209 {
15210 static struct _ssSFcnModelMethods3 methods3;
15211 ssSetModelMethods3(childS, &methods3);
15212 }
15213
15214 /* Allocate memory for states auxilliary information */
15215 {
15216 static struct _ssStatesInfo2 statesInfo2;
15217 static ssPeriodicStatesInfo periodicStatesInfo;
15218 ssSetStatesInfo2(childS, &statesInfo2);
15219 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
15220 }
15221
15222 /* inputs */
15223 {
15224 static struct _ssPortInputs inputPortInfo[2];
15225 _ssSetNumInputPorts(childS, 2);
15226 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
15227
15228 /* port 0 */
15229 {
15230 static real32_T const *sfcnUPtrs[1];
15231 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
15232 ssGetLocalBlockIO(rts))->GeneratedSFunction1_n1;
15233 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
15234 _ssSetInputPortNumDimensions(childS, 0, 1);
15235 ssSetInputPortWidth(childS, 0, 1);
15236 }
15237
15238 /* port 1 */
15239 {
15240 static real32_T const *sfcnUPtrs[1];
15241 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled123;
15242 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
15243 _ssSetInputPortNumDimensions(childS, 1, 1);
15244 ssSetInputPortWidth(childS, 1, 1);
15245 }
15246 }
15247
15248 /* outputs */
15249 {
15250 static struct _ssPortOutputs outputPortInfo[1];
15251 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
15252 _ssSetNumOutputPorts(childS, 1);
15253
15254 /* port 0 */
15255 {
15256 _ssSetOutputPortNumDimensions(childS, 0, 1);
15257 ssSetOutputPortWidth(childS, 0, 1);
15258 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
15259 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_fb));
15260 }
15261 }
15262
15263 /* path info */
15264 _ssSetModelName(childS, "Gain_sf");
15265 _ssSetPath(childS,
15266 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/RwyLControl/gain3/Generated S-Function");
15267 if (ssGetRTModel(rts) == (NULL)) {
15268 _ssSetParentSS(childS, rts);
15269 _ssSetRootSS(childS, ssGetRootSS(rts));
15270 } else {
15271 ssSetRTModel(childS,ssGetRTModel(rts));
15272 _ssSetParentSS(childS, (NULL));
15273 _ssSetRootSS(childS, childS);
15274 }
15275
15276 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
15277
15278 /* registration */
15279 Gain_sf(childS);
15280 sfcnInitializeSizes(childS);
15281 sfcnInitializeSampleTimes(childS);
15282
15283 /* adjust sample time */
15284 ssSetSampleTime(childS, 0, 0.0);
15285 ssSetOffsetTime(childS, 0, 0.0);
15286 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
15287
15288 /* set compiled values of dynamic vector attributes */
15289 ssSetNumNonsampledZCs(childS, 0);
15290
15291 /* Update connectivity flags for each port */
15292 _ssSetInputPortConnected(childS, 0, 1);
15293 _ssSetInputPortConnected(childS, 1, 1);
15294 _ssSetOutputPortConnected(childS, 0, 1);
15295 _ssSetOutputPortBeingMerged(childS, 0, 0);
15296
15297 /* Update the BufferDstPort flags for each input port */
15298 _ssSetInputPortBufferDstPort(childS, 0, -1);
15299 _ssSetInputPortBufferDstPort(childS, 1, -1);
15300
15301 /* Instance data for generated S-Function: Gain */
15302 {
15303 SimStruct *rts = childS;
15304
15305#include "Gain_sfcn_rtw/Gain_sid.h"
15306
15307 }
15308 }
15309
15310 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S169>/Generated S-Function (Gain_sf) */
15311 {
15312 SimStruct *childS = ssGetSFunction(rts, 85);
15313
15314 /* timing info */
15315 static time_T sfcnPeriod[1];
15316 static time_T sfcnOffset[1];
15317 static int_T sfcnTsMap[1];
15318 (void) memset((void*)sfcnPeriod, 0,
15319 sizeof(time_T)*1);
15320 (void) memset((void*)sfcnOffset, 0,
15321 sizeof(time_T)*1);
15322 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
15323 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
15324 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
15325
15326 /* Set up the mdlInfo pointer */
15327# ifdef USE_RTMODEL
15328
15329 {
15330 static struct _ssBlkInfo2 _blkInfo2;
15331 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
15332 ssSetBlkInfo2Ptr(childS, blkInfo2);
15333 }
15334
15335 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
15336
15337# else
15338
15339 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
15340
15341# endif /* USE_RTMODEL */
15342
15343 /* Allocate memory of model methods 2 */
15344 {
15345 static struct _ssSFcnModelMethods2 methods2;
15346 ssSetModelMethods2(childS, &methods2);
15347 }
15348
15349 /* Allocate memory of model methods 3 */
15350 {
15351 static struct _ssSFcnModelMethods3 methods3;
15352 ssSetModelMethods3(childS, &methods3);
15353 }
15354
15355 /* Allocate memory for states auxilliary information */
15356 {
15357 static struct _ssStatesInfo2 statesInfo2;
15358 static ssPeriodicStatesInfo periodicStatesInfo;
15359 ssSetStatesInfo2(childS, &statesInfo2);
15360 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
15361 }
15362
15363 /* inputs */
15364 {
15365 static struct _ssPortInputs inputPortInfo[2];
15366 _ssSetNumInputPorts(childS, 2);
15367 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
15368
15369 /* port 0 */
15370 {
15371 static real32_T const *sfcnUPtrs[1];
15372 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
15373 ssGetLocalBlockIO(rts))->GeneratedSFunction_fb;
15374 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
15375 _ssSetInputPortNumDimensions(childS, 0, 1);
15376 ssSetInputPortWidth(childS, 0, 1);
15377 }
15378
15379 /* port 1 */
15380 {
15381 static real32_T const *sfcnUPtrs[1];
15382 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled116;
15383 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
15384 _ssSetInputPortNumDimensions(childS, 1, 1);
15385 ssSetInputPortWidth(childS, 1, 1);
15386 }
15387 }
15388
15389 /* outputs */
15390 {
15391 static struct _ssPortOutputs outputPortInfo[1];
15392 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
15393 _ssSetNumOutputPorts(childS, 1);
15394
15395 /* port 0 */
15396 {
15397 _ssSetOutputPortNumDimensions(childS, 0, 1);
15398 ssSetOutputPortWidth(childS, 0, 1);
15399 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
15400 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_ok));
15401 }
15402 }
15403
15404 /* path info */
15405 _ssSetModelName(childS, "Gain_sf");
15406 _ssSetPath(childS,
15407 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/RwyLControl/gain4/Generated S-Function");
15408 if (ssGetRTModel(rts) == (NULL)) {
15409 _ssSetParentSS(childS, rts);
15410 _ssSetRootSS(childS, ssGetRootSS(rts));
15411 } else {
15412 ssSetRTModel(childS,ssGetRTModel(rts));
15413 _ssSetParentSS(childS, (NULL));
15414 _ssSetRootSS(childS, childS);
15415 }
15416
15417 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
15418
15419 /* registration */
15420 Gain_sf(childS);
15421 sfcnInitializeSizes(childS);
15422 sfcnInitializeSampleTimes(childS);
15423
15424 /* adjust sample time */
15425 ssSetSampleTime(childS, 0, 0.0);
15426 ssSetOffsetTime(childS, 0, 0.0);
15427 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
15428
15429 /* set compiled values of dynamic vector attributes */
15430 ssSetNumNonsampledZCs(childS, 0);
15431
15432 /* Update connectivity flags for each port */
15433 _ssSetInputPortConnected(childS, 0, 1);
15434 _ssSetInputPortConnected(childS, 1, 1);
15435 _ssSetOutputPortConnected(childS, 0, 1);
15436 _ssSetOutputPortBeingMerged(childS, 0, 0);
15437
15438 /* Update the BufferDstPort flags for each input port */
15439 _ssSetInputPortBufferDstPort(childS, 0, -1);
15440 _ssSetInputPortBufferDstPort(childS, 1, -1);
15441
15442 /* Instance data for generated S-Function: Gain */
15443 {
15444 SimStruct *rts = childS;
15445
15446#include "Gain_sfcn_rtw/Gain_sid.h"
15447
15448 }
15449 }
15450
15451 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S160>/Generated S-Function3 (IntegratorLimited_sf) */
15452 {
15453 SimStruct *childS = ssGetSFunction(rts, 86);
15454
15455 /* timing info */
15456 static time_T sfcnPeriod[1];
15457 static time_T sfcnOffset[1];
15458 static int_T sfcnTsMap[1];
15459 (void) memset((void*)sfcnPeriod, 0,
15460 sizeof(time_T)*1);
15461 (void) memset((void*)sfcnOffset, 0,
15462 sizeof(time_T)*1);
15463 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
15464 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
15465 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
15466
15467 /* Set up the mdlInfo pointer */
15468# ifdef USE_RTMODEL
15469
15470 {
15471 static struct _ssBlkInfo2 _blkInfo2;
15472 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
15473 ssSetBlkInfo2Ptr(childS, blkInfo2);
15474 }
15475
15476 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
15477
15478# else
15479
15480 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
15481
15482# endif /* USE_RTMODEL */
15483
15484 /* Allocate memory of model methods 2 */
15485 {
15486 static struct _ssSFcnModelMethods2 methods2;
15487 ssSetModelMethods2(childS, &methods2);
15488 }
15489
15490 /* Allocate memory of model methods 3 */
15491 {
15492 static struct _ssSFcnModelMethods3 methods3;
15493 ssSetModelMethods3(childS, &methods3);
15494 }
15495
15496 /* Allocate memory for states auxilliary information */
15497 {
15498 static struct _ssStatesInfo2 statesInfo2;
15499 static ssPeriodicStatesInfo periodicStatesInfo;
15500 ssSetStatesInfo2(childS, &statesInfo2);
15501 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
15502 }
15503
15504 /* inputs */
15505 {
15506 static struct _ssPortInputs inputPortInfo[7];
15507 _ssSetNumInputPorts(childS, 7);
15508 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
15509
15510 /* port 0 */
15511 {
15512 static real32_T const *sfcnUPtrs[1];
15513 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
15514 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReuseS;
15515 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
15516 _ssSetInputPortNumDimensions(childS, 0, 1);
15517 ssSetInputPortWidth(childS, 0, 1);
15518 }
15519
15520 /* port 1 */
15521 {
15522 static int8_T const *sfcnUPtrs[1];
15523 sfcnUPtrs[0] = (int8_T const *) &((B_AFCS_MODEL1_T *)
15524 ssGetLocalBlockIO(rts))->DataTypeConversion4_g;
15525 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
15526 _ssSetInputPortNumDimensions(childS, 1, 1);
15527 ssSetInputPortWidth(childS, 1, 1);
15528 }
15529
15530 /* port 2 */
15531 {
15532 static real32_T const *sfcnUPtrs[1];
15533 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled106;
15534 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
15535 _ssSetInputPortNumDimensions(childS, 2, 1);
15536 ssSetInputPortWidth(childS, 2, 1);
15537 }
15538
15539 /* port 3 */
15540 {
15541 static real32_T const *sfcnUPtrs[1];
15542 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled106;
15543 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
15544 _ssSetInputPortNumDimensions(childS, 3, 1);
15545 ssSetInputPortWidth(childS, 3, 1);
15546 }
15547
15548 /* port 4 */
15549 {
15550 static real32_T const *sfcnUPtrs[1];
15551 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled111;
15552 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
15553 _ssSetInputPortNumDimensions(childS, 4, 1);
15554 ssSetInputPortWidth(childS, 4, 1);
15555 }
15556
15557 /* port 5 */
15558 {
15559 static real32_T const *sfcnUPtrs[1];
15560 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled112;
15561 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
15562 _ssSetInputPortNumDimensions(childS, 5, 1);
15563 ssSetInputPortWidth(childS, 5, 1);
15564 }
15565
15566 /* port 6 */
15567 {
15568 static real32_T const *sfcnUPtrs[1];
15569 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
15570 ssGetLocalBlockIO(rts))->GeneratedSFunction_ok;
15571 _ssSetInputPortSignalPtrs(childS, 6, (InputPtrsType)&sfcnUPtrs[0]);
15572 _ssSetInputPortNumDimensions(childS, 6, 1);
15573 ssSetInputPortWidth(childS, 6, 1);
15574 }
15575 }
15576
15577 /* outputs */
15578 {
15579 static struct _ssPortOutputs outputPortInfo[1];
15580 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
15581 _ssSetNumOutputPorts(childS, 1);
15582
15583 /* port 0 */
15584 {
15585 _ssSetOutputPortNumDimensions(childS, 0, 1);
15586 ssSetOutputPortWidth(childS, 0, 1);
15587 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
15588 *) ssGetLocalBlockIO(rts))->Saturation2_p));
15589 }
15590 }
15591
15592 /* path info */
15593 _ssSetModelName(childS, "IntegratorLimited_sf");
15594 _ssSetPath(childS,
15595 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/RwyLControl/Integrator Limited1/Generated S-Function3");
15596 if (ssGetRTModel(rts) == (NULL)) {
15597 _ssSetParentSS(childS, rts);
15598 _ssSetRootSS(childS, ssGetRootSS(rts));
15599 } else {
15600 ssSetRTModel(childS,ssGetRTModel(rts));
15601 _ssSetParentSS(childS, (NULL));
15602 _ssSetRootSS(childS, childS);
15603 }
15604
15605 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
15606
15607 /* work vectors */
15608 {
15609 static struct _ssDWorkRecord dWorkRecord[4];
15610 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
15611 ssSetSFcnDWork(childS, dWorkRecord);
15612 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
15613 _ssSetNumDWork(childS, 4);
15614
15615 /* DWORK0 */
15616 ssSetDWorkWidth(childS, 0, 1);
15617 ssSetDWorkDataType(childS, 0,SS_SINGLE);
15618 ssSetDWorkComplexSignal(childS, 0, 0);
15619 ssSetDWorkUsedAsDState(childS, 0, 1);
15620 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 214))[0]);
15621
15622 /* DWORK1 */
15623 ssSetDWorkWidth(childS, 1, 1);
15624 ssSetDWorkDataType(childS, 1,SS_SINGLE);
15625 ssSetDWorkComplexSignal(childS, 1, 0);
15626 ssSetDWorkUsedAsDState(childS, 1, 1);
15627 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 215))[0]);
15628
15629 /* DWORK2 */
15630 ssSetDWorkWidth(childS, 2, 1);
15631 ssSetDWorkDataType(childS, 2,SS_INT8);
15632 ssSetDWorkComplexSignal(childS, 2, 0);
15633 ssSetDWorkUsedAsDState(childS, 2, 1);
15634 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 441))[0]);
15635
15636 /* DWORK3 */
15637 ssSetDWorkWidth(childS, 3, 1);
15638 ssSetDWorkDataType(childS, 3,SS_INT8);
15639 ssSetDWorkComplexSignal(childS, 3, 0);
15640 ssSetDWorkUsedAsDState(childS, 3, 1);
15641 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 442))[0]);
15642 }
15643
15644 /* registration */
15645 IntegratorLimited_sf(childS);
15646 sfcnInitializeSizes(childS);
15647 sfcnInitializeSampleTimes(childS);
15648
15649 /* adjust sample time */
15650 ssSetSampleTime(childS, 0, 0.0);
15651 ssSetOffsetTime(childS, 0, 0.0);
15652 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
15653
15654 /* set compiled values of dynamic vector attributes */
15655 ssSetNumNonsampledZCs(childS, 0);
15656
15657 /* Update connectivity flags for each port */
15658 _ssSetInputPortConnected(childS, 0, 1);
15659 _ssSetInputPortConnected(childS, 1, 1);
15660 _ssSetInputPortConnected(childS, 2, 1);
15661 _ssSetInputPortConnected(childS, 3, 1);
15662 _ssSetInputPortConnected(childS, 4, 1);
15663 _ssSetInputPortConnected(childS, 5, 1);
15664 _ssSetInputPortConnected(childS, 6, 1);
15665 _ssSetOutputPortConnected(childS, 0, 1);
15666 _ssSetOutputPortBeingMerged(childS, 0, 0);
15667
15668 /* Update the BufferDstPort flags for each input port */
15669 _ssSetInputPortBufferDstPort(childS, 0, -1);
15670 _ssSetInputPortBufferDstPort(childS, 1, -1);
15671 _ssSetInputPortBufferDstPort(childS, 2, -1);
15672 _ssSetInputPortBufferDstPort(childS, 3, -1);
15673 _ssSetInputPortBufferDstPort(childS, 4, -1);
15674 _ssSetInputPortBufferDstPort(childS, 5, -1);
15675 _ssSetInputPortBufferDstPort(childS, 6, -1);
15676
15677 /* Instance data for generated S-Function: IntegratorLimited */
15678 {
15679 SimStruct *rts = childS;
15680
15681#include "IntegratorLimited_sfcn_rtw/IntegratorLimited_sid.h"
15682
15683 }
15684 }
15685
15686 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S129>/Generated S-Function6 (Res180_sf) */
15687 {
15688 SimStruct *childS = ssGetSFunction(rts, 87);
15689
15690 /* timing info */
15691 static time_T sfcnPeriod[1];
15692 static time_T sfcnOffset[1];
15693 static int_T sfcnTsMap[1];
15694 (void) memset((void*)sfcnPeriod, 0,
15695 sizeof(time_T)*1);
15696 (void) memset((void*)sfcnOffset, 0,
15697 sizeof(time_T)*1);
15698 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
15699 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
15700 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
15701
15702 /* Set up the mdlInfo pointer */
15703# ifdef USE_RTMODEL
15704
15705 {
15706 static struct _ssBlkInfo2 _blkInfo2;
15707 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
15708 ssSetBlkInfo2Ptr(childS, blkInfo2);
15709 }
15710
15711 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
15712
15713# else
15714
15715 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
15716
15717# endif /* USE_RTMODEL */
15718
15719 /* Allocate memory of model methods 2 */
15720 {
15721 static struct _ssSFcnModelMethods2 methods2;
15722 ssSetModelMethods2(childS, &methods2);
15723 }
15724
15725 /* Allocate memory of model methods 3 */
15726 {
15727 static struct _ssSFcnModelMethods3 methods3;
15728 ssSetModelMethods3(childS, &methods3);
15729 }
15730
15731 /* Allocate memory for states auxilliary information */
15732 {
15733 static struct _ssStatesInfo2 statesInfo2;
15734 static ssPeriodicStatesInfo periodicStatesInfo;
15735 ssSetStatesInfo2(childS, &statesInfo2);
15736 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
15737 }
15738
15739 /* inputs */
15740 {
15741 static struct _ssPortInputs inputPortInfo[1];
15742 _ssSetNumInputPorts(childS, 1);
15743 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
15744
15745 /* port 0 */
15746 {
15747 static real32_T const *sfcnUPtrs[1];
15748 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
15749 ssGetLocalBlockIO(rts))->Sum3_cy;
15750 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
15751 _ssSetInputPortNumDimensions(childS, 0, 1);
15752 ssSetInputPortWidth(childS, 0, 1);
15753 }
15754 }
15755
15756 /* outputs */
15757 {
15758 static struct _ssPortOutputs outputPortInfo[1];
15759 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
15760 _ssSetNumOutputPorts(childS, 1);
15761
15762 /* port 0 */
15763 {
15764 _ssSetOutputPortNumDimensions(childS, 0, 1);
15765 ssSetOutputPortWidth(childS, 0, 1);
15766 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
15767 *) ssGetLocalBlockIO(rts))->GeneratedSFunction6_h3));
15768 }
15769 }
15770
15771 /* path info */
15772 _ssSetModelName(childS, "Res180_sf");
15773 _ssSetPath(childS,
15774 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/RwyLControl/Generated S-Function6");
15775 if (ssGetRTModel(rts) == (NULL)) {
15776 _ssSetParentSS(childS, rts);
15777 _ssSetRootSS(childS, ssGetRootSS(rts));
15778 } else {
15779 ssSetRTModel(childS,ssGetRTModel(rts));
15780 _ssSetParentSS(childS, (NULL));
15781 _ssSetRootSS(childS, childS);
15782 }
15783
15784 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
15785
15786 /* registration */
15787 Res180_sf(childS);
15788 sfcnInitializeSizes(childS);
15789 sfcnInitializeSampleTimes(childS);
15790
15791 /* adjust sample time */
15792 ssSetSampleTime(childS, 0, 0.0);
15793 ssSetOffsetTime(childS, 0, 0.0);
15794 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
15795
15796 /* set compiled values of dynamic vector attributes */
15797 ssSetNumNonsampledZCs(childS, 0);
15798
15799 /* Update connectivity flags for each port */
15800 _ssSetInputPortConnected(childS, 0, 1);
15801 _ssSetOutputPortConnected(childS, 0, 1);
15802 _ssSetOutputPortBeingMerged(childS, 0, 0);
15803
15804 /* Update the BufferDstPort flags for each input port */
15805 _ssSetInputPortBufferDstPort(childS, 0, -1);
15806
15807 /* Instance data for generated S-Function: Res180 */
15808 {
15809 SimStruct *rts = childS;
15810
15811#include "Res180_sfcn_rtw/Res180_sid.h"
15812
15813 }
15814 }
15815
15816 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S162>/Generated S-Function1 (SaturationLimiter_sf) */
15817 {
15818 SimStruct *childS = ssGetSFunction(rts, 88);
15819
15820 /* timing info */
15821 static time_T sfcnPeriod[1];
15822 static time_T sfcnOffset[1];
15823 static int_T sfcnTsMap[1];
15824 (void) memset((void*)sfcnPeriod, 0,
15825 sizeof(time_T)*1);
15826 (void) memset((void*)sfcnOffset, 0,
15827 sizeof(time_T)*1);
15828 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
15829 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
15830 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
15831
15832 /* Set up the mdlInfo pointer */
15833# ifdef USE_RTMODEL
15834
15835 {
15836 static struct _ssBlkInfo2 _blkInfo2;
15837 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
15838 ssSetBlkInfo2Ptr(childS, blkInfo2);
15839 }
15840
15841 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
15842
15843# else
15844
15845 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
15846
15847# endif /* USE_RTMODEL */
15848
15849 /* Allocate memory of model methods 2 */
15850 {
15851 static struct _ssSFcnModelMethods2 methods2;
15852 ssSetModelMethods2(childS, &methods2);
15853 }
15854
15855 /* Allocate memory of model methods 3 */
15856 {
15857 static struct _ssSFcnModelMethods3 methods3;
15858 ssSetModelMethods3(childS, &methods3);
15859 }
15860
15861 /* Allocate memory for states auxilliary information */
15862 {
15863 static struct _ssStatesInfo2 statesInfo2;
15864 static ssPeriodicStatesInfo periodicStatesInfo;
15865 ssSetStatesInfo2(childS, &statesInfo2);
15866 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
15867 }
15868
15869 /* inputs */
15870 {
15871 static struct _ssPortInputs inputPortInfo[3];
15872 _ssSetNumInputPorts(childS, 3);
15873 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
15874
15875 /* port 0 */
15876 {
15877 static real32_T const *sfcnUPtrs[1];
15878 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
15879 ssGetLocalBlockIO(rts))->GeneratedSFunction6_h3;
15880 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
15881 _ssSetInputPortNumDimensions(childS, 0, 1);
15882 ssSetInputPortWidth(childS, 0, 1);
15883 }
15884
15885 /* port 1 */
15886 {
15887 static real32_T const *sfcnUPtrs[1];
15888 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled114;
15889 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
15890 _ssSetInputPortNumDimensions(childS, 1, 1);
15891 ssSetInputPortWidth(childS, 1, 1);
15892 }
15893
15894 /* port 2 */
15895 {
15896 static real32_T const *sfcnUPtrs[1];
15897 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled115;
15898 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
15899 _ssSetInputPortNumDimensions(childS, 2, 1);
15900 ssSetInputPortWidth(childS, 2, 1);
15901 }
15902 }
15903
15904 /* outputs */
15905 {
15906 static struct _ssPortOutputs outputPortInfo[1];
15907 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
15908 _ssSetNumOutputPorts(childS, 1);
15909
15910 /* port 0 */
15911 {
15912 _ssSetOutputPortNumDimensions(childS, 0, 1);
15913 ssSetOutputPortWidth(childS, 0, 1);
15914 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
15915 *) ssGetLocalBlockIO(rts))->GeneratedSFunction1_oh));
15916 }
15917 }
15918
15919 /* path info */
15920 _ssSetModelName(childS, "SaturationLimiter_sf");
15921 _ssSetPath(childS,
15922 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/RwyLControl/Saturation Limiter1/Generated S-Function1");
15923 if (ssGetRTModel(rts) == (NULL)) {
15924 _ssSetParentSS(childS, rts);
15925 _ssSetRootSS(childS, ssGetRootSS(rts));
15926 } else {
15927 ssSetRTModel(childS,ssGetRTModel(rts));
15928 _ssSetParentSS(childS, (NULL));
15929 _ssSetRootSS(childS, childS);
15930 }
15931
15932 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
15933
15934 /* registration */
15935 SaturationLimiter_sf(childS);
15936 sfcnInitializeSizes(childS);
15937 sfcnInitializeSampleTimes(childS);
15938
15939 /* adjust sample time */
15940 ssSetSampleTime(childS, 0, 0.0);
15941 ssSetOffsetTime(childS, 0, 0.0);
15942 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
15943
15944 /* set compiled values of dynamic vector attributes */
15945 ssSetNumNonsampledZCs(childS, 0);
15946
15947 /* Update connectivity flags for each port */
15948 _ssSetInputPortConnected(childS, 0, 1);
15949 _ssSetInputPortConnected(childS, 1, 1);
15950 _ssSetInputPortConnected(childS, 2, 1);
15951 _ssSetOutputPortConnected(childS, 0, 1);
15952 _ssSetOutputPortBeingMerged(childS, 0, 0);
15953
15954 /* Update the BufferDstPort flags for each input port */
15955 _ssSetInputPortBufferDstPort(childS, 0, -1);
15956 _ssSetInputPortBufferDstPort(childS, 1, -1);
15957 _ssSetInputPortBufferDstPort(childS, 2, -1);
15958
15959 /* Instance data for generated S-Function: SaturationLimiter */
15960 {
15961 SimStruct *rts = childS;
15962
15963#include "SaturationLimiter_sfcn_rtw/SaturationLimiter_sid.h"
15964
15965 }
15966 }
15967
15968 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S167>/Generated S-Function (Gain_sf) */
15969 {
15970 SimStruct *childS = ssGetSFunction(rts, 89);
15971
15972 /* timing info */
15973 static time_T sfcnPeriod[1];
15974 static time_T sfcnOffset[1];
15975 static int_T sfcnTsMap[1];
15976 (void) memset((void*)sfcnPeriod, 0,
15977 sizeof(time_T)*1);
15978 (void) memset((void*)sfcnOffset, 0,
15979 sizeof(time_T)*1);
15980 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
15981 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
15982 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
15983
15984 /* Set up the mdlInfo pointer */
15985# ifdef USE_RTMODEL
15986
15987 {
15988 static struct _ssBlkInfo2 _blkInfo2;
15989 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
15990 ssSetBlkInfo2Ptr(childS, blkInfo2);
15991 }
15992
15993 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
15994
15995# else
15996
15997 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
15998
15999# endif /* USE_RTMODEL */
16000
16001 /* Allocate memory of model methods 2 */
16002 {
16003 static struct _ssSFcnModelMethods2 methods2;
16004 ssSetModelMethods2(childS, &methods2);
16005 }
16006
16007 /* Allocate memory of model methods 3 */
16008 {
16009 static struct _ssSFcnModelMethods3 methods3;
16010 ssSetModelMethods3(childS, &methods3);
16011 }
16012
16013 /* Allocate memory for states auxilliary information */
16014 {
16015 static struct _ssStatesInfo2 statesInfo2;
16016 static ssPeriodicStatesInfo periodicStatesInfo;
16017 ssSetStatesInfo2(childS, &statesInfo2);
16018 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
16019 }
16020
16021 /* inputs */
16022 {
16023 static struct _ssPortInputs inputPortInfo[2];
16024 _ssSetNumInputPorts(childS, 2);
16025 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
16026
16027 /* port 0 */
16028 {
16029 static real32_T const *sfcnUPtrs[1];
16030 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
16031 ssGetLocalBlockIO(rts))->GeneratedSFunction1_oh;
16032 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
16033 _ssSetInputPortNumDimensions(childS, 0, 1);
16034 ssSetInputPortWidth(childS, 0, 1);
16035 }
16036
16037 /* port 1 */
16038 {
16039 static real32_T const *sfcnUPtrs[1];
16040 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled108;
16041 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
16042 _ssSetInputPortNumDimensions(childS, 1, 1);
16043 ssSetInputPortWidth(childS, 1, 1);
16044 }
16045 }
16046
16047 /* outputs */
16048 {
16049 static struct _ssPortOutputs outputPortInfo[1];
16050 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
16051 _ssSetNumOutputPorts(childS, 1);
16052
16053 /* port 0 */
16054 {
16055 _ssSetOutputPortNumDimensions(childS, 0, 1);
16056 ssSetOutputPortWidth(childS, 0, 1);
16057 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
16058 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_mc));
16059 }
16060 }
16061
16062 /* path info */
16063 _ssSetModelName(childS, "Gain_sf");
16064 _ssSetPath(childS,
16065 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/RwyLControl/gain2/Generated S-Function");
16066 if (ssGetRTModel(rts) == (NULL)) {
16067 _ssSetParentSS(childS, rts);
16068 _ssSetRootSS(childS, ssGetRootSS(rts));
16069 } else {
16070 ssSetRTModel(childS,ssGetRTModel(rts));
16071 _ssSetParentSS(childS, (NULL));
16072 _ssSetRootSS(childS, childS);
16073 }
16074
16075 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
16076
16077 /* registration */
16078 Gain_sf(childS);
16079 sfcnInitializeSizes(childS);
16080 sfcnInitializeSampleTimes(childS);
16081
16082 /* adjust sample time */
16083 ssSetSampleTime(childS, 0, 0.0);
16084 ssSetOffsetTime(childS, 0, 0.0);
16085 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
16086
16087 /* set compiled values of dynamic vector attributes */
16088 ssSetNumNonsampledZCs(childS, 0);
16089
16090 /* Update connectivity flags for each port */
16091 _ssSetInputPortConnected(childS, 0, 1);
16092 _ssSetInputPortConnected(childS, 1, 1);
16093 _ssSetOutputPortConnected(childS, 0, 1);
16094 _ssSetOutputPortBeingMerged(childS, 0, 0);
16095
16096 /* Update the BufferDstPort flags for each input port */
16097 _ssSetInputPortBufferDstPort(childS, 0, -1);
16098 _ssSetInputPortBufferDstPort(childS, 1, -1);
16099
16100 /* Instance data for generated S-Function: Gain */
16101 {
16102 SimStruct *rts = childS;
16103
16104#include "Gain_sfcn_rtw/Gain_sid.h"
16105
16106 }
16107 }
16108
16109 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S161>/Generated S-Function1 (SaturationLimiter_sf) */
16110 {
16111 SimStruct *childS = ssGetSFunction(rts, 90);
16112
16113 /* timing info */
16114 static time_T sfcnPeriod[1];
16115 static time_T sfcnOffset[1];
16116 static int_T sfcnTsMap[1];
16117 (void) memset((void*)sfcnPeriod, 0,
16118 sizeof(time_T)*1);
16119 (void) memset((void*)sfcnOffset, 0,
16120 sizeof(time_T)*1);
16121 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
16122 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
16123 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
16124
16125 /* Set up the mdlInfo pointer */
16126# ifdef USE_RTMODEL
16127
16128 {
16129 static struct _ssBlkInfo2 _blkInfo2;
16130 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
16131 ssSetBlkInfo2Ptr(childS, blkInfo2);
16132 }
16133
16134 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
16135
16136# else
16137
16138 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
16139
16140# endif /* USE_RTMODEL */
16141
16142 /* Allocate memory of model methods 2 */
16143 {
16144 static struct _ssSFcnModelMethods2 methods2;
16145 ssSetModelMethods2(childS, &methods2);
16146 }
16147
16148 /* Allocate memory of model methods 3 */
16149 {
16150 static struct _ssSFcnModelMethods3 methods3;
16151 ssSetModelMethods3(childS, &methods3);
16152 }
16153
16154 /* Allocate memory for states auxilliary information */
16155 {
16156 static struct _ssStatesInfo2 statesInfo2;
16157 static ssPeriodicStatesInfo periodicStatesInfo;
16158 ssSetStatesInfo2(childS, &statesInfo2);
16159 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
16160 }
16161
16162 /* inputs */
16163 {
16164 static struct _ssPortInputs inputPortInfo[3];
16165 _ssSetNumInputPorts(childS, 3);
16166 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
16167
16168 /* port 0 */
16169 {
16170 static real32_T const *sfcnUPtrs[1];
16171 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
16172 ssGetLocalBlockIO(rts))->GeneratedSFunction_mc;
16173 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
16174 _ssSetInputPortNumDimensions(childS, 0, 1);
16175 ssSetInputPortWidth(childS, 0, 1);
16176 }
16177
16178 /* port 1 */
16179 {
16180 static real32_T const *sfcnUPtrs[1];
16181 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled107;
16182 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
16183 _ssSetInputPortNumDimensions(childS, 1, 1);
16184 ssSetInputPortWidth(childS, 1, 1);
16185 }
16186
16187 /* port 2 */
16188 {
16189 static real32_T const *sfcnUPtrs[1];
16190 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled119;
16191 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
16192 _ssSetInputPortNumDimensions(childS, 2, 1);
16193 ssSetInputPortWidth(childS, 2, 1);
16194 }
16195 }
16196
16197 /* outputs */
16198 {
16199 static struct _ssPortOutputs outputPortInfo[1];
16200 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
16201 _ssSetNumOutputPorts(childS, 1);
16202
16203 /* port 0 */
16204 {
16205 _ssSetOutputPortNumDimensions(childS, 0, 1);
16206 ssSetOutputPortWidth(childS, 0, 1);
16207 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
16208 *) ssGetLocalBlockIO(rts))->Saturation2_p));
16209 }
16210 }
16211
16212 /* path info */
16213 _ssSetModelName(childS, "SaturationLimiter_sf");
16214 _ssSetPath(childS,
16215 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/RwyLControl/Saturation Limiter/Generated S-Function1");
16216 if (ssGetRTModel(rts) == (NULL)) {
16217 _ssSetParentSS(childS, rts);
16218 _ssSetRootSS(childS, ssGetRootSS(rts));
16219 } else {
16220 ssSetRTModel(childS,ssGetRTModel(rts));
16221 _ssSetParentSS(childS, (NULL));
16222 _ssSetRootSS(childS, childS);
16223 }
16224
16225 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
16226
16227 /* registration */
16228 SaturationLimiter_sf(childS);
16229 sfcnInitializeSizes(childS);
16230 sfcnInitializeSampleTimes(childS);
16231
16232 /* adjust sample time */
16233 ssSetSampleTime(childS, 0, 0.0);
16234 ssSetOffsetTime(childS, 0, 0.0);
16235 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
16236
16237 /* set compiled values of dynamic vector attributes */
16238 ssSetNumNonsampledZCs(childS, 0);
16239
16240 /* Update connectivity flags for each port */
16241 _ssSetInputPortConnected(childS, 0, 1);
16242 _ssSetInputPortConnected(childS, 1, 1);
16243 _ssSetInputPortConnected(childS, 2, 1);
16244 _ssSetOutputPortConnected(childS, 0, 1);
16245 _ssSetOutputPortBeingMerged(childS, 0, 0);
16246
16247 /* Update the BufferDstPort flags for each input port */
16248 _ssSetInputPortBufferDstPort(childS, 0, -1);
16249 _ssSetInputPortBufferDstPort(childS, 1, -1);
16250 _ssSetInputPortBufferDstPort(childS, 2, -1);
16251
16252 /* Instance data for generated S-Function: SaturationLimiter */
16253 {
16254 SimStruct *rts = childS;
16255
16256#include "SaturationLimiter_sfcn_rtw/SaturationLimiter_sid.h"
16257
16258 }
16259 }
16260
16261 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S129>/Generated S-Function1 (Res180_sf) */
16262 {
16263 SimStruct *childS = ssGetSFunction(rts, 91);
16264
16265 /* timing info */
16266 static time_T sfcnPeriod[1];
16267 static time_T sfcnOffset[1];
16268 static int_T sfcnTsMap[1];
16269 (void) memset((void*)sfcnPeriod, 0,
16270 sizeof(time_T)*1);
16271 (void) memset((void*)sfcnOffset, 0,
16272 sizeof(time_T)*1);
16273 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
16274 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
16275 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
16276
16277 /* Set up the mdlInfo pointer */
16278# ifdef USE_RTMODEL
16279
16280 {
16281 static struct _ssBlkInfo2 _blkInfo2;
16282 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
16283 ssSetBlkInfo2Ptr(childS, blkInfo2);
16284 }
16285
16286 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
16287
16288# else
16289
16290 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
16291
16292# endif /* USE_RTMODEL */
16293
16294 /* Allocate memory of model methods 2 */
16295 {
16296 static struct _ssSFcnModelMethods2 methods2;
16297 ssSetModelMethods2(childS, &methods2);
16298 }
16299
16300 /* Allocate memory of model methods 3 */
16301 {
16302 static struct _ssSFcnModelMethods3 methods3;
16303 ssSetModelMethods3(childS, &methods3);
16304 }
16305
16306 /* Allocate memory for states auxilliary information */
16307 {
16308 static struct _ssStatesInfo2 statesInfo2;
16309 static ssPeriodicStatesInfo periodicStatesInfo;
16310 ssSetStatesInfo2(childS, &statesInfo2);
16311 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
16312 }
16313
16314 /* inputs */
16315 {
16316 static struct _ssPortInputs inputPortInfo[1];
16317 _ssSetNumInputPorts(childS, 1);
16318 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
16319
16320 /* port 0 */
16321 {
16322 static real32_T const *sfcnUPtrs[1];
16323 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
16324 ssGetLocalBlockIO(rts))->Sum1_lk;
16325 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
16326 _ssSetInputPortNumDimensions(childS, 0, 1);
16327 ssSetInputPortWidth(childS, 0, 1);
16328 }
16329 }
16330
16331 /* outputs */
16332 {
16333 static struct _ssPortOutputs outputPortInfo[1];
16334 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
16335 _ssSetNumOutputPorts(childS, 1);
16336
16337 /* port 0 */
16338 {
16339 _ssSetOutputPortNumDimensions(childS, 0, 1);
16340 ssSetOutputPortWidth(childS, 0, 1);
16341 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
16342 *) ssGetLocalBlockIO(rts))->GeneratedSFunction1_f));
16343 }
16344 }
16345
16346 /* path info */
16347 _ssSetModelName(childS, "Res180_sf");
16348 _ssSetPath(childS,
16349 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/RwyLControl/Generated S-Function1");
16350 if (ssGetRTModel(rts) == (NULL)) {
16351 _ssSetParentSS(childS, rts);
16352 _ssSetRootSS(childS, ssGetRootSS(rts));
16353 } else {
16354 ssSetRTModel(childS,ssGetRTModel(rts));
16355 _ssSetParentSS(childS, (NULL));
16356 _ssSetRootSS(childS, childS);
16357 }
16358
16359 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
16360
16361 /* registration */
16362 Res180_sf(childS);
16363 sfcnInitializeSizes(childS);
16364 sfcnInitializeSampleTimes(childS);
16365
16366 /* adjust sample time */
16367 ssSetSampleTime(childS, 0, 0.0);
16368 ssSetOffsetTime(childS, 0, 0.0);
16369 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
16370
16371 /* set compiled values of dynamic vector attributes */
16372 ssSetNumNonsampledZCs(childS, 0);
16373
16374 /* Update connectivity flags for each port */
16375 _ssSetInputPortConnected(childS, 0, 1);
16376 _ssSetOutputPortConnected(childS, 0, 1);
16377 _ssSetOutputPortBeingMerged(childS, 0, 0);
16378
16379 /* Update the BufferDstPort flags for each input port */
16380 _ssSetInputPortBufferDstPort(childS, 0, -1);
16381
16382 /* Instance data for generated S-Function: Res180 */
16383 {
16384 SimStruct *rts = childS;
16385
16386#include "Res180_sfcn_rtw/Res180_sid.h"
16387
16388 }
16389 }
16390
16391 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S166>/Generated S-Function (Gain_sf) */
16392 {
16393 SimStruct *childS = ssGetSFunction(rts, 92);
16394
16395 /* timing info */
16396 static time_T sfcnPeriod[1];
16397 static time_T sfcnOffset[1];
16398 static int_T sfcnTsMap[1];
16399 (void) memset((void*)sfcnPeriod, 0,
16400 sizeof(time_T)*1);
16401 (void) memset((void*)sfcnOffset, 0,
16402 sizeof(time_T)*1);
16403 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
16404 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
16405 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
16406
16407 /* Set up the mdlInfo pointer */
16408# ifdef USE_RTMODEL
16409
16410 {
16411 static struct _ssBlkInfo2 _blkInfo2;
16412 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
16413 ssSetBlkInfo2Ptr(childS, blkInfo2);
16414 }
16415
16416 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
16417
16418# else
16419
16420 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
16421
16422# endif /* USE_RTMODEL */
16423
16424 /* Allocate memory of model methods 2 */
16425 {
16426 static struct _ssSFcnModelMethods2 methods2;
16427 ssSetModelMethods2(childS, &methods2);
16428 }
16429
16430 /* Allocate memory of model methods 3 */
16431 {
16432 static struct _ssSFcnModelMethods3 methods3;
16433 ssSetModelMethods3(childS, &methods3);
16434 }
16435
16436 /* Allocate memory for states auxilliary information */
16437 {
16438 static struct _ssStatesInfo2 statesInfo2;
16439 static ssPeriodicStatesInfo periodicStatesInfo;
16440 ssSetStatesInfo2(childS, &statesInfo2);
16441 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
16442 }
16443
16444 /* inputs */
16445 {
16446 static struct _ssPortInputs inputPortInfo[2];
16447 _ssSetNumInputPorts(childS, 2);
16448 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
16449
16450 /* port 0 */
16451 {
16452 static real32_T const *sfcnUPtrs[1];
16453 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
16454 ssGetLocalBlockIO(rts))->GeneratedSFunction1_f;
16455 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
16456 _ssSetInputPortNumDimensions(childS, 0, 1);
16457 ssSetInputPortWidth(childS, 0, 1);
16458 }
16459
16460 /* port 1 */
16461 {
16462 static real32_T const *sfcnUPtrs[1];
16463 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled108;
16464 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
16465 _ssSetInputPortNumDimensions(childS, 1, 1);
16466 ssSetInputPortWidth(childS, 1, 1);
16467 }
16468 }
16469
16470 /* outputs */
16471 {
16472 static struct _ssPortOutputs outputPortInfo[1];
16473 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
16474 _ssSetNumOutputPorts(childS, 1);
16475
16476 /* port 0 */
16477 {
16478 _ssSetOutputPortNumDimensions(childS, 0, 1);
16479 ssSetOutputPortWidth(childS, 0, 1);
16480 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
16481 *) ssGetLocalBlockIO(rts))->Saturation2_p));
16482 }
16483 }
16484
16485 /* path info */
16486 _ssSetModelName(childS, "Gain_sf");
16487 _ssSetPath(childS,
16488 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/RwyLControl/gain/Generated S-Function");
16489 if (ssGetRTModel(rts) == (NULL)) {
16490 _ssSetParentSS(childS, rts);
16491 _ssSetRootSS(childS, ssGetRootSS(rts));
16492 } else {
16493 ssSetRTModel(childS,ssGetRTModel(rts));
16494 _ssSetParentSS(childS, (NULL));
16495 _ssSetRootSS(childS, childS);
16496 }
16497
16498 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
16499
16500 /* registration */
16501 Gain_sf(childS);
16502 sfcnInitializeSizes(childS);
16503 sfcnInitializeSampleTimes(childS);
16504
16505 /* adjust sample time */
16506 ssSetSampleTime(childS, 0, 0.0);
16507 ssSetOffsetTime(childS, 0, 0.0);
16508 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
16509
16510 /* set compiled values of dynamic vector attributes */
16511 ssSetNumNonsampledZCs(childS, 0);
16512
16513 /* Update connectivity flags for each port */
16514 _ssSetInputPortConnected(childS, 0, 1);
16515 _ssSetInputPortConnected(childS, 1, 1);
16516 _ssSetOutputPortConnected(childS, 0, 1);
16517 _ssSetOutputPortBeingMerged(childS, 0, 0);
16518
16519 /* Update the BufferDstPort flags for each input port */
16520 _ssSetInputPortBufferDstPort(childS, 0, -1);
16521 _ssSetInputPortBufferDstPort(childS, 1, -1);
16522
16523 /* Instance data for generated S-Function: Gain */
16524 {
16525 SimStruct *rts = childS;
16526
16527#include "Gain_sfcn_rtw/Gain_sid.h"
16528
16529 }
16530 }
16531
16532 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S159>/Generated S-Function4 (LagFilter_sf) */
16533 {
16534 SimStruct *childS = ssGetSFunction(rts, 93);
16535
16536 /* timing info */
16537 static time_T sfcnPeriod[1];
16538 static time_T sfcnOffset[1];
16539 static int_T sfcnTsMap[1];
16540 (void) memset((void*)sfcnPeriod, 0,
16541 sizeof(time_T)*1);
16542 (void) memset((void*)sfcnOffset, 0,
16543 sizeof(time_T)*1);
16544 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
16545 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
16546 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
16547
16548 /* Set up the mdlInfo pointer */
16549# ifdef USE_RTMODEL
16550
16551 {
16552 static struct _ssBlkInfo2 _blkInfo2;
16553 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
16554 ssSetBlkInfo2Ptr(childS, blkInfo2);
16555 }
16556
16557 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
16558
16559# else
16560
16561 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
16562
16563# endif /* USE_RTMODEL */
16564
16565 /* Allocate memory of model methods 2 */
16566 {
16567 static struct _ssSFcnModelMethods2 methods2;
16568 ssSetModelMethods2(childS, &methods2);
16569 }
16570
16571 /* Allocate memory of model methods 3 */
16572 {
16573 static struct _ssSFcnModelMethods3 methods3;
16574 ssSetModelMethods3(childS, &methods3);
16575 }
16576
16577 /* Allocate memory for states auxilliary information */
16578 {
16579 static struct _ssStatesInfo2 statesInfo2;
16580 static ssPeriodicStatesInfo periodicStatesInfo;
16581 ssSetStatesInfo2(childS, &statesInfo2);
16582 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
16583 }
16584
16585 /* inputs */
16586 {
16587 static struct _ssPortInputs inputPortInfo[6];
16588 _ssSetNumInputPorts(childS, 6);
16589 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
16590
16591 /* port 0 */
16592 {
16593 static real32_T const *sfcnUPtrs[1];
16594 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
16595 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReuseS;
16596 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
16597 _ssSetInputPortNumDimensions(childS, 0, 1);
16598 ssSetInputPortWidth(childS, 0, 1);
16599 }
16600
16601 /* port 1 */
16602 {
16603 static int8_T const *sfcnUPtrs[1];
16604 sfcnUPtrs[0] = (int8_T const *) &((B_AFCS_MODEL1_T *)
16605 ssGetLocalBlockIO(rts))->DataTypeConversion4_g;
16606 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
16607 _ssSetInputPortNumDimensions(childS, 1, 1);
16608 ssSetInputPortWidth(childS, 1, 1);
16609 }
16610
16611 /* port 2 */
16612 {
16613 static real32_T const *sfcnUPtrs[1];
16614 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled107;
16615 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
16616 _ssSetInputPortNumDimensions(childS, 2, 1);
16617 ssSetInputPortWidth(childS, 2, 1);
16618 }
16619
16620 /* port 3 */
16621 {
16622 static real32_T const *sfcnUPtrs[1];
16623 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
16624 ssGetLocalBlockIO(rts))->Switch_bg;
16625 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
16626 _ssSetInputPortNumDimensions(childS, 3, 1);
16627 ssSetInputPortWidth(childS, 3, 1);
16628 }
16629
16630 /* port 4 */
16631 {
16632 static real32_T const *sfcnUPtrs[1];
16633 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
16634 ssGetLocalBlockIO(rts))->Switch_bg;
16635 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
16636 _ssSetInputPortNumDimensions(childS, 4, 1);
16637 ssSetInputPortWidth(childS, 4, 1);
16638 }
16639
16640 /* port 5 */
16641 {
16642 static real32_T const *sfcnUPtrs[1];
16643 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
16644 ssGetLocalBlockIO(rts))->Sum_oh;
16645 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
16646 _ssSetInputPortNumDimensions(childS, 5, 1);
16647 ssSetInputPortWidth(childS, 5, 1);
16648 }
16649 }
16650
16651 /* outputs */
16652 {
16653 static struct _ssPortOutputs outputPortInfo[1];
16654 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
16655 _ssSetNumOutputPorts(childS, 1);
16656
16657 /* port 0 */
16658 {
16659 _ssSetOutputPortNumDimensions(childS, 0, 1);
16660 ssSetOutputPortWidth(childS, 0, 1);
16661 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
16662 *) ssGetLocalBlockIO(rts))->GeneratedSFunction4_mj));
16663 }
16664 }
16665
16666 /* path info */
16667 _ssSetModelName(childS, "LagFilter_sf");
16668 _ssSetPath(childS,
16669 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/RwyLControl/ lag filter/Generated S-Function4");
16670 if (ssGetRTModel(rts) == (NULL)) {
16671 _ssSetParentSS(childS, rts);
16672 _ssSetRootSS(childS, ssGetRootSS(rts));
16673 } else {
16674 ssSetRTModel(childS,ssGetRTModel(rts));
16675 _ssSetParentSS(childS, (NULL));
16676 _ssSetRootSS(childS, childS);
16677 }
16678
16679 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
16680
16681 /* work vectors */
16682 {
16683 static struct _ssDWorkRecord dWorkRecord[4];
16684 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
16685 ssSetSFcnDWork(childS, dWorkRecord);
16686 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
16687 _ssSetNumDWork(childS, 4);
16688
16689 /* DWORK0 */
16690 ssSetDWorkWidth(childS, 0, 1);
16691 ssSetDWorkDataType(childS, 0,SS_SINGLE);
16692 ssSetDWorkComplexSignal(childS, 0, 0);
16693 ssSetDWorkUsedAsDState(childS, 0, 1);
16694 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 216))[0]);
16695
16696 /* DWORK1 */
16697 ssSetDWorkWidth(childS, 1, 1);
16698 ssSetDWorkDataType(childS, 1,SS_SINGLE);
16699 ssSetDWorkComplexSignal(childS, 1, 0);
16700 ssSetDWorkUsedAsDState(childS, 1, 1);
16701 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 217))[0]);
16702
16703 /* DWORK2 */
16704 ssSetDWorkWidth(childS, 2, 1);
16705 ssSetDWorkDataType(childS, 2,SS_INT8);
16706 ssSetDWorkComplexSignal(childS, 2, 0);
16707 ssSetDWorkUsedAsDState(childS, 2, 1);
16708 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 443))[0]);
16709
16710 /* DWORK3 */
16711 ssSetDWorkWidth(childS, 3, 1);
16712 ssSetDWorkDataType(childS, 3,SS_INT8);
16713 ssSetDWorkComplexSignal(childS, 3, 0);
16714 ssSetDWorkUsedAsDState(childS, 3, 1);
16715 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 444))[0]);
16716 }
16717
16718 /* registration */
16719 LagFilter_sf(childS);
16720 sfcnInitializeSizes(childS);
16721 sfcnInitializeSampleTimes(childS);
16722
16723 /* adjust sample time */
16724 ssSetSampleTime(childS, 0, 0.0);
16725 ssSetOffsetTime(childS, 0, 0.0);
16726 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
16727
16728 /* set compiled values of dynamic vector attributes */
16729 ssSetNumNonsampledZCs(childS, 0);
16730
16731 /* Update connectivity flags for each port */
16732 _ssSetInputPortConnected(childS, 0, 1);
16733 _ssSetInputPortConnected(childS, 1, 1);
16734 _ssSetInputPortConnected(childS, 2, 1);
16735 _ssSetInputPortConnected(childS, 3, 1);
16736 _ssSetInputPortConnected(childS, 4, 1);
16737 _ssSetInputPortConnected(childS, 5, 1);
16738 _ssSetOutputPortConnected(childS, 0, 1);
16739 _ssSetOutputPortBeingMerged(childS, 0, 0);
16740
16741 /* Update the BufferDstPort flags for each input port */
16742 _ssSetInputPortBufferDstPort(childS, 0, -1);
16743 _ssSetInputPortBufferDstPort(childS, 1, -1);
16744 _ssSetInputPortBufferDstPort(childS, 2, -1);
16745 _ssSetInputPortBufferDstPort(childS, 3, -1);
16746 _ssSetInputPortBufferDstPort(childS, 4, -1);
16747 _ssSetInputPortBufferDstPort(childS, 5, -1);
16748
16749 /* Instance data for generated S-Function: LagFilter */
16750 {
16751 SimStruct *rts = childS;
16752
16753#include "LagFilter_sfcn_rtw/LagFilter_sid.h"
16754
16755 }
16756 }
16757
16758 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S123>/Generated S-Function5 (Fader_sf) */
16759 {
16760 SimStruct *childS = ssGetSFunction(rts, 94);
16761
16762 /* timing info */
16763 static time_T sfcnPeriod[1];
16764 static time_T sfcnOffset[1];
16765 static int_T sfcnTsMap[1];
16766 (void) memset((void*)sfcnPeriod, 0,
16767 sizeof(time_T)*1);
16768 (void) memset((void*)sfcnOffset, 0,
16769 sizeof(time_T)*1);
16770 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
16771 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
16772 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
16773
16774 /* Set up the mdlInfo pointer */
16775# ifdef USE_RTMODEL
16776
16777 {
16778 static struct _ssBlkInfo2 _blkInfo2;
16779 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
16780 ssSetBlkInfo2Ptr(childS, blkInfo2);
16781 }
16782
16783 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
16784
16785# else
16786
16787 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
16788
16789# endif /* USE_RTMODEL */
16790
16791 /* Allocate memory of model methods 2 */
16792 {
16793 static struct _ssSFcnModelMethods2 methods2;
16794 ssSetModelMethods2(childS, &methods2);
16795 }
16796
16797 /* Allocate memory of model methods 3 */
16798 {
16799 static struct _ssSFcnModelMethods3 methods3;
16800 ssSetModelMethods3(childS, &methods3);
16801 }
16802
16803 /* Allocate memory for states auxilliary information */
16804 {
16805 static struct _ssStatesInfo2 statesInfo2;
16806 static ssPeriodicStatesInfo periodicStatesInfo;
16807 ssSetStatesInfo2(childS, &statesInfo2);
16808 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
16809 }
16810
16811 /* inputs */
16812 {
16813 static struct _ssPortInputs inputPortInfo[6];
16814 _ssSetNumInputPorts(childS, 6);
16815 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
16816
16817 /* port 0 */
16818 {
16819 static real32_T const *sfcnUPtrs[1];
16820 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
16821 ssGetLocalBlockIO(rts))->MultiportSwitch2_k;
16822 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
16823 _ssSetInputPortNumDimensions(childS, 0, 1);
16824 ssSetInputPortWidth(childS, 0, 1);
16825 }
16826
16827 /* port 1 */
16828 {
16829 static real32_T const *sfcnUPtrs[1];
16830 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
16831 ssGetLocalBlockIO(rts))->MultiportSwitch2_k;
16832 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
16833 _ssSetInputPortNumDimensions(childS, 1, 1);
16834 ssSetInputPortWidth(childS, 1, 1);
16835 }
16836
16837 /* port 2 */
16838 {
16839 static int8_T const *sfcnUPtrs[1];
16840 sfcnUPtrs[0] = (int8_T const *) &((B_AFCS_MODEL1_T *)
16841 ssGetLocalBlockIO(rts))->Switch9;
16842 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
16843 _ssSetInputPortNumDimensions(childS, 2, 1);
16844 ssSetInputPortWidth(childS, 2, 1);
16845 }
16846
16847 /* port 3 */
16848 {
16849 static int8_T const *sfcnUPtrs[1];
16850 sfcnUPtrs[0] = (int8_T const *) &AFCS_MODEL1_ConstP.pooled143;
16851 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
16852 _ssSetInputPortNumDimensions(childS, 3, 1);
16853 ssSetInputPortWidth(childS, 3, 1);
16854 }
16855
16856 /* port 4 */
16857 {
16858 static real32_T const *sfcnUPtrs[1];
16859 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled116;
16860 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
16861 _ssSetInputPortNumDimensions(childS, 4, 1);
16862 ssSetInputPortWidth(childS, 4, 1);
16863 }
16864
16865 /* port 5 */
16866 {
16867 static real32_T const *sfcnUPtrs[1];
16868 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
16869 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReuseS;
16870 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
16871 _ssSetInputPortNumDimensions(childS, 5, 1);
16872 ssSetInputPortWidth(childS, 5, 1);
16873 }
16874 }
16875
16876 /* outputs */
16877 {
16878 static struct _ssPortOutputs outputPortInfo[1];
16879 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
16880 _ssSetNumOutputPorts(childS, 1);
16881
16882 /* port 0 */
16883 {
16884 _ssSetOutputPortNumDimensions(childS, 0, 1);
16885 ssSetOutputPortWidth(childS, 0, 1);
16886 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
16887 *) ssGetLocalBlockIO(rts))->aprc));
16888 }
16889 }
16890
16891 /* path info */
16892 _ssSetModelName(childS, "Fader_sf");
16893 _ssSetPath(childS,
16894 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/Fader/Generated S-Function5");
16895 if (ssGetRTModel(rts) == (NULL)) {
16896 _ssSetParentSS(childS, rts);
16897 _ssSetRootSS(childS, ssGetRootSS(rts));
16898 } else {
16899 ssSetRTModel(childS,ssGetRTModel(rts));
16900 _ssSetParentSS(childS, (NULL));
16901 _ssSetRootSS(childS, childS);
16902 }
16903
16904 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
16905
16906 /* work vectors */
16907 {
16908 static struct _ssDWorkRecord dWorkRecord[7];
16909 static struct _ssDWorkAuxRecord dWorkAuxRecord[7];
16910 ssSetSFcnDWork(childS, dWorkRecord);
16911 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
16912 _ssSetNumDWork(childS, 7);
16913
16914 /* DWORK0 */
16915 ssSetDWorkWidth(childS, 0, 1);
16916 ssSetDWorkDataType(childS, 0,SS_SINGLE);
16917 ssSetDWorkComplexSignal(childS, 0, 0);
16918 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 292))[0]);
16919
16920 /* DWORK1 */
16921 ssSetDWorkWidth(childS, 1, 1);
16922 ssSetDWorkDataType(childS, 1,SS_SINGLE);
16923 ssSetDWorkComplexSignal(childS, 1, 0);
16924 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 293))[0]);
16925
16926 /* DWORK2 */
16927 ssSetDWorkWidth(childS, 2, 1);
16928 ssSetDWorkDataType(childS, 2,SS_SINGLE);
16929 ssSetDWorkComplexSignal(childS, 2, 0);
16930 _ssSetDWork(childS, 2, &((real32_T*) ssGetDWork(rts, 294))[0]);
16931
16932 /* DWORK3 */
16933 ssSetDWorkWidth(childS, 3, 1);
16934 ssSetDWorkDataType(childS, 3,SS_INT32);
16935 ssSetDWorkComplexSignal(childS, 3, 0);
16936 _ssSetDWork(childS, 3, &((int32_T*) ssGetDWork(rts, 334))[0]);
16937
16938 /* DWORK4 */
16939 ssSetDWorkWidth(childS, 4, 1);
16940 ssSetDWorkDataType(childS, 4,SS_INT32);
16941 ssSetDWorkComplexSignal(childS, 4, 0);
16942 _ssSetDWork(childS, 4, &((int32_T*) ssGetDWork(rts, 335))[0]);
16943
16944 /* DWORK5 */
16945 ssSetDWorkWidth(childS, 5, 1);
16946 ssSetDWorkDataType(childS, 5,SS_INT8);
16947 ssSetDWorkComplexSignal(childS, 5, 0);
16948 _ssSetDWork(childS, 5, &((int8_T*) ssGetDWork(rts, 519))[0]);
16949
16950 /* DWORK6 */
16951 ssSetDWorkWidth(childS, 6, 1);
16952 ssSetDWorkDataType(childS, 6,SS_INT8);
16953 ssSetDWorkComplexSignal(childS, 6, 0);
16954 _ssSetDWork(childS, 6, &((int8_T*) ssGetDWork(rts, 520))[0]);
16955 }
16956
16957 /* registration */
16958 Fader_sf(childS);
16959 sfcnInitializeSizes(childS);
16960 sfcnInitializeSampleTimes(childS);
16961
16962 /* adjust sample time */
16963 ssSetSampleTime(childS, 0, 0.0);
16964 ssSetOffsetTime(childS, 0, 0.0);
16965 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
16966
16967 /* set compiled values of dynamic vector attributes */
16968 ssSetNumNonsampledZCs(childS, 0);
16969
16970 /* Update connectivity flags for each port */
16971 _ssSetInputPortConnected(childS, 0, 1);
16972 _ssSetInputPortConnected(childS, 1, 1);
16973 _ssSetInputPortConnected(childS, 2, 1);
16974 _ssSetInputPortConnected(childS, 3, 1);
16975 _ssSetInputPortConnected(childS, 4, 1);
16976 _ssSetInputPortConnected(childS, 5, 1);
16977 _ssSetOutputPortConnected(childS, 0, 1);
16978 _ssSetOutputPortBeingMerged(childS, 0, 0);
16979
16980 /* Update the BufferDstPort flags for each input port */
16981 _ssSetInputPortBufferDstPort(childS, 0, -1);
16982 _ssSetInputPortBufferDstPort(childS, 1, -1);
16983 _ssSetInputPortBufferDstPort(childS, 2, -1);
16984 _ssSetInputPortBufferDstPort(childS, 3, -1);
16985 _ssSetInputPortBufferDstPort(childS, 4, -1);
16986 _ssSetInputPortBufferDstPort(childS, 5, -1);
16987
16988 /* Instance data for generated S-Function: Fader */
16989 {
16990 SimStruct *rts = childS;
16991
16992#include "Fader_sfcn_rtw/Fader_sid.h"
16993
16994 }
16995 }
16996
16997 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S163>/Generated S-Function1 (SaturationLimiter_sf) */
16998 {
16999 SimStruct *childS = ssGetSFunction(rts, 95);
17000
17001 /* timing info */
17002 static time_T sfcnPeriod[1];
17003 static time_T sfcnOffset[1];
17004 static int_T sfcnTsMap[1];
17005 (void) memset((void*)sfcnPeriod, 0,
17006 sizeof(time_T)*1);
17007 (void) memset((void*)sfcnOffset, 0,
17008 sizeof(time_T)*1);
17009 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
17010 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
17011 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
17012
17013 /* Set up the mdlInfo pointer */
17014# ifdef USE_RTMODEL
17015
17016 {
17017 static struct _ssBlkInfo2 _blkInfo2;
17018 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
17019 ssSetBlkInfo2Ptr(childS, blkInfo2);
17020 }
17021
17022 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
17023
17024# else
17025
17026 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
17027
17028# endif /* USE_RTMODEL */
17029
17030 /* Allocate memory of model methods 2 */
17031 {
17032 static struct _ssSFcnModelMethods2 methods2;
17033 ssSetModelMethods2(childS, &methods2);
17034 }
17035
17036 /* Allocate memory of model methods 3 */
17037 {
17038 static struct _ssSFcnModelMethods3 methods3;
17039 ssSetModelMethods3(childS, &methods3);
17040 }
17041
17042 /* Allocate memory for states auxilliary information */
17043 {
17044 static struct _ssStatesInfo2 statesInfo2;
17045 static ssPeriodicStatesInfo periodicStatesInfo;
17046 ssSetStatesInfo2(childS, &statesInfo2);
17047 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
17048 }
17049
17050 /* inputs */
17051 {
17052 static struct _ssPortInputs inputPortInfo[3];
17053 _ssSetNumInputPorts(childS, 3);
17054 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
17055
17056 /* port 0 */
17057 {
17058 static real32_T const *sfcnUPtrs[1];
17059 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
17060 ssGetLocalBlockIO(rts))->Divide_c2;
17061 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
17062 _ssSetInputPortNumDimensions(childS, 0, 1);
17063 ssSetInputPortWidth(childS, 0, 1);
17064 }
17065
17066 /* port 1 */
17067 {
17068 static real32_T const *sfcnUPtrs[1];
17069 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled107;
17070 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
17071 _ssSetInputPortNumDimensions(childS, 1, 1);
17072 ssSetInputPortWidth(childS, 1, 1);
17073 }
17074
17075 /* port 2 */
17076 {
17077 static real32_T const *sfcnUPtrs[1];
17078 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled119;
17079 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
17080 _ssSetInputPortNumDimensions(childS, 2, 1);
17081 ssSetInputPortWidth(childS, 2, 1);
17082 }
17083 }
17084
17085 /* outputs */
17086 {
17087 static struct _ssPortOutputs outputPortInfo[1];
17088 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
17089 _ssSetNumOutputPorts(childS, 1);
17090
17091 /* port 0 */
17092 {
17093 _ssSetOutputPortNumDimensions(childS, 0, 1);
17094 ssSetOutputPortWidth(childS, 0, 1);
17095 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
17096 *) ssGetLocalBlockIO(rts))->GeneratedSFunction1_nk));
17097 }
17098 }
17099
17100 /* path info */
17101 _ssSetModelName(childS, "SaturationLimiter_sf");
17102 _ssSetPath(childS,
17103 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/RwyLControl/Saturation Limiter2/Generated S-Function1");
17104 if (ssGetRTModel(rts) == (NULL)) {
17105 _ssSetParentSS(childS, rts);
17106 _ssSetRootSS(childS, ssGetRootSS(rts));
17107 } else {
17108 ssSetRTModel(childS,ssGetRTModel(rts));
17109 _ssSetParentSS(childS, (NULL));
17110 _ssSetRootSS(childS, childS);
17111 }
17112
17113 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
17114
17115 /* registration */
17116 SaturationLimiter_sf(childS);
17117 sfcnInitializeSizes(childS);
17118 sfcnInitializeSampleTimes(childS);
17119
17120 /* adjust sample time */
17121 ssSetSampleTime(childS, 0, 0.005);
17122 ssSetOffsetTime(childS, 0, 0.0);
17123 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[1];
17124
17125 /* set compiled values of dynamic vector attributes */
17126 ssSetNumNonsampledZCs(childS, 0);
17127
17128 /* Update connectivity flags for each port */
17129 _ssSetInputPortConnected(childS, 0, 1);
17130 _ssSetInputPortConnected(childS, 1, 1);
17131 _ssSetInputPortConnected(childS, 2, 1);
17132 _ssSetOutputPortConnected(childS, 0, 1);
17133 _ssSetOutputPortBeingMerged(childS, 0, 0);
17134
17135 /* Update the BufferDstPort flags for each input port */
17136 _ssSetInputPortBufferDstPort(childS, 0, -1);
17137 _ssSetInputPortBufferDstPort(childS, 1, -1);
17138 _ssSetInputPortBufferDstPort(childS, 2, -1);
17139
17140 /* Instance data for generated S-Function: SaturationLimiter */
17141 {
17142 SimStruct *rts = childS;
17143
17144#include "SaturationLimiter_sfcn_rtw/SaturationLimiter_sid.h"
17145
17146 }
17147 }
17148
17149 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S165>/Generated S-Function1 (SaturationLimiter_sf) */
17150 {
17151 SimStruct *childS = ssGetSFunction(rts, 96);
17152
17153 /* timing info */
17154 static time_T sfcnPeriod[1];
17155 static time_T sfcnOffset[1];
17156 static int_T sfcnTsMap[1];
17157 (void) memset((void*)sfcnPeriod, 0,
17158 sizeof(time_T)*1);
17159 (void) memset((void*)sfcnOffset, 0,
17160 sizeof(time_T)*1);
17161 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
17162 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
17163 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
17164
17165 /* Set up the mdlInfo pointer */
17166# ifdef USE_RTMODEL
17167
17168 {
17169 static struct _ssBlkInfo2 _blkInfo2;
17170 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
17171 ssSetBlkInfo2Ptr(childS, blkInfo2);
17172 }
17173
17174 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
17175
17176# else
17177
17178 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
17179
17180# endif /* USE_RTMODEL */
17181
17182 /* Allocate memory of model methods 2 */
17183 {
17184 static struct _ssSFcnModelMethods2 methods2;
17185 ssSetModelMethods2(childS, &methods2);
17186 }
17187
17188 /* Allocate memory of model methods 3 */
17189 {
17190 static struct _ssSFcnModelMethods3 methods3;
17191 ssSetModelMethods3(childS, &methods3);
17192 }
17193
17194 /* Allocate memory for states auxilliary information */
17195 {
17196 static struct _ssStatesInfo2 statesInfo2;
17197 static ssPeriodicStatesInfo periodicStatesInfo;
17198 ssSetStatesInfo2(childS, &statesInfo2);
17199 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
17200 }
17201
17202 /* inputs */
17203 {
17204 static struct _ssPortInputs inputPortInfo[3];
17205 _ssSetNumInputPorts(childS, 3);
17206 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
17207
17208 /* port 0 */
17209 {
17210 static real32_T const *sfcnUPtrs[1];
17211 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
17212 ssGetLocalBlockIO(rts))->Divide1_d;
17213 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
17214 _ssSetInputPortNumDimensions(childS, 0, 1);
17215 ssSetInputPortWidth(childS, 0, 1);
17216 }
17217
17218 /* port 1 */
17219 {
17220 static real32_T const *sfcnUPtrs[1];
17221 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled114;
17222 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
17223 _ssSetInputPortNumDimensions(childS, 1, 1);
17224 ssSetInputPortWidth(childS, 1, 1);
17225 }
17226
17227 /* port 2 */
17228 {
17229 static real32_T const *sfcnUPtrs[1];
17230 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled115;
17231 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
17232 _ssSetInputPortNumDimensions(childS, 2, 1);
17233 ssSetInputPortWidth(childS, 2, 1);
17234 }
17235 }
17236
17237 /* outputs */
17238 {
17239 static struct _ssPortOutputs outputPortInfo[1];
17240 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
17241 _ssSetNumOutputPorts(childS, 1);
17242
17243 /* port 0 */
17244 {
17245 _ssSetOutputPortNumDimensions(childS, 0, 1);
17246 ssSetOutputPortWidth(childS, 0, 1);
17247 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
17248 *) ssGetLocalBlockIO(rts))->GeneratedSFunction1_d));
17249 }
17250 }
17251
17252 /* path info */
17253 _ssSetModelName(childS, "SaturationLimiter_sf");
17254 _ssSetPath(childS,
17255 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/aprcLcontrol/RwyLControl/Saturation Limiter4/Generated S-Function1");
17256 if (ssGetRTModel(rts) == (NULL)) {
17257 _ssSetParentSS(childS, rts);
17258 _ssSetRootSS(childS, ssGetRootSS(rts));
17259 } else {
17260 ssSetRTModel(childS,ssGetRTModel(rts));
17261 _ssSetParentSS(childS, (NULL));
17262 _ssSetRootSS(childS, childS);
17263 }
17264
17265 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
17266
17267 /* registration */
17268 SaturationLimiter_sf(childS);
17269 sfcnInitializeSizes(childS);
17270 sfcnInitializeSampleTimes(childS);
17271
17272 /* adjust sample time */
17273 ssSetSampleTime(childS, 0, 0.0);
17274 ssSetOffsetTime(childS, 0, 0.0);
17275 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
17276
17277 /* set compiled values of dynamic vector attributes */
17278 ssSetNumNonsampledZCs(childS, 0);
17279
17280 /* Update connectivity flags for each port */
17281 _ssSetInputPortConnected(childS, 0, 1);
17282 _ssSetInputPortConnected(childS, 1, 1);
17283 _ssSetInputPortConnected(childS, 2, 1);
17284 _ssSetOutputPortConnected(childS, 0, 1);
17285 _ssSetOutputPortBeingMerged(childS, 0, 0);
17286
17287 /* Update the BufferDstPort flags for each input port */
17288 _ssSetInputPortBufferDstPort(childS, 0, -1);
17289 _ssSetInputPortBufferDstPort(childS, 1, -1);
17290 _ssSetInputPortBufferDstPort(childS, 2, -1);
17291
17292 /* Instance data for generated S-Function: SaturationLimiter */
17293 {
17294 SimStruct *rts = childS;
17295
17296#include "SaturationLimiter_sfcn_rtw/SaturationLimiter_sid.h"
17297
17298 }
17299 }
17300
17301 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S190>/Generated S-Function4 (LagFilter_sf) */
17302 {
17303 SimStruct *childS = ssGetSFunction(rts, 97);
17304
17305 /* timing info */
17306 static time_T sfcnPeriod[1];
17307 static time_T sfcnOffset[1];
17308 static int_T sfcnTsMap[1];
17309 (void) memset((void*)sfcnPeriod, 0,
17310 sizeof(time_T)*1);
17311 (void) memset((void*)sfcnOffset, 0,
17312 sizeof(time_T)*1);
17313 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
17314 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
17315 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
17316
17317 /* Set up the mdlInfo pointer */
17318# ifdef USE_RTMODEL
17319
17320 {
17321 static struct _ssBlkInfo2 _blkInfo2;
17322 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
17323 ssSetBlkInfo2Ptr(childS, blkInfo2);
17324 }
17325
17326 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
17327
17328# else
17329
17330 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
17331
17332# endif /* USE_RTMODEL */
17333
17334 /* Allocate memory of model methods 2 */
17335 {
17336 static struct _ssSFcnModelMethods2 methods2;
17337 ssSetModelMethods2(childS, &methods2);
17338 }
17339
17340 /* Allocate memory of model methods 3 */
17341 {
17342 static struct _ssSFcnModelMethods3 methods3;
17343 ssSetModelMethods3(childS, &methods3);
17344 }
17345
17346 /* Allocate memory for states auxilliary information */
17347 {
17348 static struct _ssStatesInfo2 statesInfo2;
17349 static ssPeriodicStatesInfo periodicStatesInfo;
17350 ssSetStatesInfo2(childS, &statesInfo2);
17351 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
17352 }
17353
17354 /* inputs */
17355 {
17356 static struct _ssPortInputs inputPortInfo[6];
17357 _ssSetNumInputPorts(childS, 6);
17358 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
17359
17360 /* port 0 */
17361 {
17362 static real32_T const *sfcnUPtrs[1];
17363 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
17364 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReuseS;
17365 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
17366 _ssSetInputPortNumDimensions(childS, 0, 1);
17367 ssSetInputPortWidth(childS, 0, 1);
17368 }
17369
17370 /* port 1 */
17371 {
17372 static int8_T const *sfcnUPtrs[1];
17373 sfcnUPtrs[0] = (int8_T const *) &((B_AFCS_MODEL1_T *)
17374 ssGetLocalBlockIO(rts))->DataTypeConversion_f;
17375 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
17376 _ssSetInputPortNumDimensions(childS, 1, 1);
17377 ssSetInputPortWidth(childS, 1, 1);
17378 }
17379
17380 /* port 2 */
17381 {
17382 static real32_T const *sfcnUPtrs[1];
17383 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled124;
17384 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
17385 _ssSetInputPortNumDimensions(childS, 2, 1);
17386 ssSetInputPortWidth(childS, 2, 1);
17387 }
17388
17389 /* port 3 */
17390 {
17391 static real32_T const *sfcnUPtrs[1];
17392 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
17393 ssGetLocalBlockIO(rts))->Switch_jf;
17394 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
17395 _ssSetInputPortNumDimensions(childS, 3, 1);
17396 ssSetInputPortWidth(childS, 3, 1);
17397 }
17398
17399 /* port 4 */
17400 {
17401 static real32_T const *sfcnUPtrs[1];
17402 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
17403 ssGetLocalBlockIO(rts))->Switch_jf;
17404 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
17405 _ssSetInputPortNumDimensions(childS, 4, 1);
17406 ssSetInputPortWidth(childS, 4, 1);
17407 }
17408
17409 /* port 5 */
17410 {
17411 static real32_T const *sfcnUPtrs[1];
17412 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled106;
17413 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
17414 _ssSetInputPortNumDimensions(childS, 5, 1);
17415 ssSetInputPortWidth(childS, 5, 1);
17416 }
17417 }
17418
17419 /* outputs */
17420 {
17421 static struct _ssPortOutputs outputPortInfo[1];
17422 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
17423 _ssSetNumOutputPorts(childS, 1);
17424
17425 /* port 0 */
17426 {
17427 _ssSetOutputPortNumDimensions(childS, 0, 1);
17428 ssSetOutputPortWidth(childS, 0, 1);
17429 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
17430 *) ssGetLocalBlockIO(rts))->GeneratedSFunction4_k));
17431 }
17432 }
17433
17434 /* path info */
17435 _ssSetModelName(childS, "LagFilter_sf");
17436 _ssSetPath(childS,
17437 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/apycLcontrol/ lag filter/Generated S-Function4");
17438 if (ssGetRTModel(rts) == (NULL)) {
17439 _ssSetParentSS(childS, rts);
17440 _ssSetRootSS(childS, ssGetRootSS(rts));
17441 } else {
17442 ssSetRTModel(childS,ssGetRTModel(rts));
17443 _ssSetParentSS(childS, (NULL));
17444 _ssSetRootSS(childS, childS);
17445 }
17446
17447 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
17448
17449 /* work vectors */
17450 {
17451 static struct _ssDWorkRecord dWorkRecord[4];
17452 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
17453 ssSetSFcnDWork(childS, dWorkRecord);
17454 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
17455 _ssSetNumDWork(childS, 4);
17456
17457 /* DWORK0 */
17458 ssSetDWorkWidth(childS, 0, 1);
17459 ssSetDWorkDataType(childS, 0,SS_SINGLE);
17460 ssSetDWorkComplexSignal(childS, 0, 0);
17461 ssSetDWorkUsedAsDState(childS, 0, 1);
17462 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 219))[0]);
17463
17464 /* DWORK1 */
17465 ssSetDWorkWidth(childS, 1, 1);
17466 ssSetDWorkDataType(childS, 1,SS_SINGLE);
17467 ssSetDWorkComplexSignal(childS, 1, 0);
17468 ssSetDWorkUsedAsDState(childS, 1, 1);
17469 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 220))[0]);
17470
17471 /* DWORK2 */
17472 ssSetDWorkWidth(childS, 2, 1);
17473 ssSetDWorkDataType(childS, 2,SS_INT8);
17474 ssSetDWorkComplexSignal(childS, 2, 0);
17475 ssSetDWorkUsedAsDState(childS, 2, 1);
17476 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 446))[0]);
17477
17478 /* DWORK3 */
17479 ssSetDWorkWidth(childS, 3, 1);
17480 ssSetDWorkDataType(childS, 3,SS_INT8);
17481 ssSetDWorkComplexSignal(childS, 3, 0);
17482 ssSetDWorkUsedAsDState(childS, 3, 1);
17483 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 447))[0]);
17484 }
17485
17486 /* registration */
17487 LagFilter_sf(childS);
17488 sfcnInitializeSizes(childS);
17489 sfcnInitializeSampleTimes(childS);
17490
17491 /* adjust sample time */
17492 ssSetSampleTime(childS, 0, 0.0);
17493 ssSetOffsetTime(childS, 0, 0.0);
17494 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
17495
17496 /* set compiled values of dynamic vector attributes */
17497 ssSetNumNonsampledZCs(childS, 0);
17498
17499 /* Update connectivity flags for each port */
17500 _ssSetInputPortConnected(childS, 0, 1);
17501 _ssSetInputPortConnected(childS, 1, 1);
17502 _ssSetInputPortConnected(childS, 2, 1);
17503 _ssSetInputPortConnected(childS, 3, 1);
17504 _ssSetInputPortConnected(childS, 4, 1);
17505 _ssSetInputPortConnected(childS, 5, 1);
17506 _ssSetOutputPortConnected(childS, 0, 1);
17507 _ssSetOutputPortBeingMerged(childS, 0, 0);
17508
17509 /* Update the BufferDstPort flags for each input port */
17510 _ssSetInputPortBufferDstPort(childS, 0, -1);
17511 _ssSetInputPortBufferDstPort(childS, 1, -1);
17512 _ssSetInputPortBufferDstPort(childS, 2, -1);
17513 _ssSetInputPortBufferDstPort(childS, 3, -1);
17514 _ssSetInputPortBufferDstPort(childS, 4, -1);
17515 _ssSetInputPortBufferDstPort(childS, 5, -1);
17516
17517 /* Instance data for generated S-Function: LagFilter */
17518 {
17519 SimStruct *rts = childS;
17520
17521#include "LagFilter_sfcn_rtw/LagFilter_sid.h"
17522
17523 }
17524 }
17525
17526 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S191>/Generated S-Function4 (LagFilter_sf) */
17527 {
17528 SimStruct *childS = ssGetSFunction(rts, 98);
17529
17530 /* timing info */
17531 static time_T sfcnPeriod[1];
17532 static time_T sfcnOffset[1];
17533 static int_T sfcnTsMap[1];
17534 (void) memset((void*)sfcnPeriod, 0,
17535 sizeof(time_T)*1);
17536 (void) memset((void*)sfcnOffset, 0,
17537 sizeof(time_T)*1);
17538 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
17539 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
17540 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
17541
17542 /* Set up the mdlInfo pointer */
17543# ifdef USE_RTMODEL
17544
17545 {
17546 static struct _ssBlkInfo2 _blkInfo2;
17547 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
17548 ssSetBlkInfo2Ptr(childS, blkInfo2);
17549 }
17550
17551 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
17552
17553# else
17554
17555 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
17556
17557# endif /* USE_RTMODEL */
17558
17559 /* Allocate memory of model methods 2 */
17560 {
17561 static struct _ssSFcnModelMethods2 methods2;
17562 ssSetModelMethods2(childS, &methods2);
17563 }
17564
17565 /* Allocate memory of model methods 3 */
17566 {
17567 static struct _ssSFcnModelMethods3 methods3;
17568 ssSetModelMethods3(childS, &methods3);
17569 }
17570
17571 /* Allocate memory for states auxilliary information */
17572 {
17573 static struct _ssStatesInfo2 statesInfo2;
17574 static ssPeriodicStatesInfo periodicStatesInfo;
17575 ssSetStatesInfo2(childS, &statesInfo2);
17576 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
17577 }
17578
17579 /* inputs */
17580 {
17581 static struct _ssPortInputs inputPortInfo[6];
17582 _ssSetNumInputPorts(childS, 6);
17583 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
17584
17585 /* port 0 */
17586 {
17587 static real32_T const *sfcnUPtrs[1];
17588 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
17589 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReuseS;
17590 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
17591 _ssSetInputPortNumDimensions(childS, 0, 1);
17592 ssSetInputPortWidth(childS, 0, 1);
17593 }
17594
17595 /* port 1 */
17596 {
17597 static int8_T const *sfcnUPtrs[1];
17598 sfcnUPtrs[0] = (int8_T const *) &((B_AFCS_MODEL1_T *)
17599 ssGetLocalBlockIO(rts))->DataTypeConversion3_l;
17600 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
17601 _ssSetInputPortNumDimensions(childS, 1, 1);
17602 ssSetInputPortWidth(childS, 1, 1);
17603 }
17604
17605 /* port 2 */
17606 {
17607 static real32_T const *sfcnUPtrs[1];
17608 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled124;
17609 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
17610 _ssSetInputPortNumDimensions(childS, 2, 1);
17611 ssSetInputPortWidth(childS, 2, 1);
17612 }
17613
17614 /* port 3 */
17615 {
17616 static real32_T const *sfcnUPtrs[1];
17617 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
17618 ssGetLocalBlockIO(rts))->Switch_jf;
17619 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
17620 _ssSetInputPortNumDimensions(childS, 3, 1);
17621 ssSetInputPortWidth(childS, 3, 1);
17622 }
17623
17624 /* port 4 */
17625 {
17626 static real32_T const *sfcnUPtrs[1];
17627 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
17628 ssGetLocalBlockIO(rts))->Switch_jf;
17629 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
17630 _ssSetInputPortNumDimensions(childS, 4, 1);
17631 ssSetInputPortWidth(childS, 4, 1);
17632 }
17633
17634 /* port 5 */
17635 {
17636 static real32_T const *sfcnUPtrs[1];
17637 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
17638 ssGetLocalBlockIO(rts))->Switch7;
17639 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
17640 _ssSetInputPortNumDimensions(childS, 5, 1);
17641 ssSetInputPortWidth(childS, 5, 1);
17642 }
17643 }
17644
17645 /* outputs */
17646 {
17647 static struct _ssPortOutputs outputPortInfo[1];
17648 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
17649 _ssSetNumOutputPorts(childS, 1);
17650
17651 /* port 0 */
17652 {
17653 _ssSetOutputPortNumDimensions(childS, 0, 1);
17654 ssSetOutputPortWidth(childS, 0, 1);
17655 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
17656 *) ssGetLocalBlockIO(rts))->GeneratedSFunction4_p));
17657 }
17658 }
17659
17660 /* path info */
17661 _ssSetModelName(childS, "LagFilter_sf");
17662 _ssSetPath(childS,
17663 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/apycLcontrol/ lag filter1/Generated S-Function4");
17664 if (ssGetRTModel(rts) == (NULL)) {
17665 _ssSetParentSS(childS, rts);
17666 _ssSetRootSS(childS, ssGetRootSS(rts));
17667 } else {
17668 ssSetRTModel(childS,ssGetRTModel(rts));
17669 _ssSetParentSS(childS, (NULL));
17670 _ssSetRootSS(childS, childS);
17671 }
17672
17673 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
17674
17675 /* work vectors */
17676 {
17677 static struct _ssDWorkRecord dWorkRecord[4];
17678 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
17679 ssSetSFcnDWork(childS, dWorkRecord);
17680 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
17681 _ssSetNumDWork(childS, 4);
17682
17683 /* DWORK0 */
17684 ssSetDWorkWidth(childS, 0, 1);
17685 ssSetDWorkDataType(childS, 0,SS_SINGLE);
17686 ssSetDWorkComplexSignal(childS, 0, 0);
17687 ssSetDWorkUsedAsDState(childS, 0, 1);
17688 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 221))[0]);
17689
17690 /* DWORK1 */
17691 ssSetDWorkWidth(childS, 1, 1);
17692 ssSetDWorkDataType(childS, 1,SS_SINGLE);
17693 ssSetDWorkComplexSignal(childS, 1, 0);
17694 ssSetDWorkUsedAsDState(childS, 1, 1);
17695 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 222))[0]);
17696
17697 /* DWORK2 */
17698 ssSetDWorkWidth(childS, 2, 1);
17699 ssSetDWorkDataType(childS, 2,SS_INT8);
17700 ssSetDWorkComplexSignal(childS, 2, 0);
17701 ssSetDWorkUsedAsDState(childS, 2, 1);
17702 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 448))[0]);
17703
17704 /* DWORK3 */
17705 ssSetDWorkWidth(childS, 3, 1);
17706 ssSetDWorkDataType(childS, 3,SS_INT8);
17707 ssSetDWorkComplexSignal(childS, 3, 0);
17708 ssSetDWorkUsedAsDState(childS, 3, 1);
17709 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 449))[0]);
17710 }
17711
17712 /* registration */
17713 LagFilter_sf(childS);
17714 sfcnInitializeSizes(childS);
17715 sfcnInitializeSampleTimes(childS);
17716
17717 /* adjust sample time */
17718 ssSetSampleTime(childS, 0, 0.0);
17719 ssSetOffsetTime(childS, 0, 0.0);
17720 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
17721
17722 /* set compiled values of dynamic vector attributes */
17723 ssSetNumNonsampledZCs(childS, 0);
17724
17725 /* Update connectivity flags for each port */
17726 _ssSetInputPortConnected(childS, 0, 1);
17727 _ssSetInputPortConnected(childS, 1, 1);
17728 _ssSetInputPortConnected(childS, 2, 1);
17729 _ssSetInputPortConnected(childS, 3, 1);
17730 _ssSetInputPortConnected(childS, 4, 1);
17731 _ssSetInputPortConnected(childS, 5, 1);
17732 _ssSetOutputPortConnected(childS, 0, 1);
17733 _ssSetOutputPortBeingMerged(childS, 0, 0);
17734
17735 /* Update the BufferDstPort flags for each input port */
17736 _ssSetInputPortBufferDstPort(childS, 0, -1);
17737 _ssSetInputPortBufferDstPort(childS, 1, -1);
17738 _ssSetInputPortBufferDstPort(childS, 2, -1);
17739 _ssSetInputPortBufferDstPort(childS, 3, -1);
17740 _ssSetInputPortBufferDstPort(childS, 4, -1);
17741 _ssSetInputPortBufferDstPort(childS, 5, -1);
17742
17743 /* Instance data for generated S-Function: LagFilter */
17744 {
17745 SimStruct *rts = childS;
17746
17747#include "LagFilter_sfcn_rtw/LagFilter_sid.h"
17748
17749 }
17750 }
17751
17752 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S193>/Generated S-Function (Res180_sf) */
17753 {
17754 SimStruct *childS = ssGetSFunction(rts, 99);
17755
17756 /* timing info */
17757 static time_T sfcnPeriod[1];
17758 static time_T sfcnOffset[1];
17759 static int_T sfcnTsMap[1];
17760 (void) memset((void*)sfcnPeriod, 0,
17761 sizeof(time_T)*1);
17762 (void) memset((void*)sfcnOffset, 0,
17763 sizeof(time_T)*1);
17764 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
17765 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
17766 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
17767
17768 /* Set up the mdlInfo pointer */
17769# ifdef USE_RTMODEL
17770
17771 {
17772 static struct _ssBlkInfo2 _blkInfo2;
17773 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
17774 ssSetBlkInfo2Ptr(childS, blkInfo2);
17775 }
17776
17777 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
17778
17779# else
17780
17781 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
17782
17783# endif /* USE_RTMODEL */
17784
17785 /* Allocate memory of model methods 2 */
17786 {
17787 static struct _ssSFcnModelMethods2 methods2;
17788 ssSetModelMethods2(childS, &methods2);
17789 }
17790
17791 /* Allocate memory of model methods 3 */
17792 {
17793 static struct _ssSFcnModelMethods3 methods3;
17794 ssSetModelMethods3(childS, &methods3);
17795 }
17796
17797 /* Allocate memory for states auxilliary information */
17798 {
17799 static struct _ssStatesInfo2 statesInfo2;
17800 static ssPeriodicStatesInfo periodicStatesInfo;
17801 ssSetStatesInfo2(childS, &statesInfo2);
17802 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
17803 }
17804
17805 /* inputs */
17806 {
17807 static struct _ssPortInputs inputPortInfo[1];
17808 _ssSetNumInputPorts(childS, 1);
17809 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
17810
17811 /* port 0 */
17812 {
17813 static real32_T const *sfcnUPtrs[1];
17814 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
17815 ssGetLocalBlockIO(rts))->Sum3_g5;
17816 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
17817 _ssSetInputPortNumDimensions(childS, 0, 1);
17818 ssSetInputPortWidth(childS, 0, 1);
17819 }
17820 }
17821
17822 /* outputs */
17823 {
17824 static struct _ssPortOutputs outputPortInfo[1];
17825 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
17826 _ssSetNumOutputPorts(childS, 1);
17827
17828 /* port 0 */
17829 {
17830 _ssSetOutputPortNumDimensions(childS, 0, 1);
17831 ssSetOutputPortWidth(childS, 0, 1);
17832 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
17833 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_bb));
17834 }
17835 }
17836
17837 /* path info */
17838 _ssSetModelName(childS, "Res180_sf");
17839 _ssSetPath(childS,
17840 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/apycLcontrol/PsiControl/Generated S-Function");
17841 if (ssGetRTModel(rts) == (NULL)) {
17842 _ssSetParentSS(childS, rts);
17843 _ssSetRootSS(childS, ssGetRootSS(rts));
17844 } else {
17845 ssSetRTModel(childS,ssGetRTModel(rts));
17846 _ssSetParentSS(childS, (NULL));
17847 _ssSetRootSS(childS, childS);
17848 }
17849
17850 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
17851
17852 /* registration */
17853 Res180_sf(childS);
17854 sfcnInitializeSizes(childS);
17855 sfcnInitializeSampleTimes(childS);
17856
17857 /* adjust sample time */
17858 ssSetSampleTime(childS, 0, 0.0);
17859 ssSetOffsetTime(childS, 0, 0.0);
17860 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
17861
17862 /* set compiled values of dynamic vector attributes */
17863 ssSetNumNonsampledZCs(childS, 0);
17864
17865 /* Update connectivity flags for each port */
17866 _ssSetInputPortConnected(childS, 0, 1);
17867 _ssSetOutputPortConnected(childS, 0, 1);
17868 _ssSetOutputPortBeingMerged(childS, 0, 0);
17869
17870 /* Update the BufferDstPort flags for each input port */
17871 _ssSetInputPortBufferDstPort(childS, 0, -1);
17872
17873 /* Instance data for generated S-Function: Res180 */
17874 {
17875 SimStruct *rts = childS;
17876
17877#include "Res180_sfcn_rtw/Res180_sid.h"
17878
17879 }
17880 }
17881
17882 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S198>/Generated S-Function1 (SaturationLimiter_sf) */
17883 {
17884 SimStruct *childS = ssGetSFunction(rts, 100);
17885
17886 /* timing info */
17887 static time_T sfcnPeriod[1];
17888 static time_T sfcnOffset[1];
17889 static int_T sfcnTsMap[1];
17890 (void) memset((void*)sfcnPeriod, 0,
17891 sizeof(time_T)*1);
17892 (void) memset((void*)sfcnOffset, 0,
17893 sizeof(time_T)*1);
17894 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
17895 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
17896 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
17897
17898 /* Set up the mdlInfo pointer */
17899# ifdef USE_RTMODEL
17900
17901 {
17902 static struct _ssBlkInfo2 _blkInfo2;
17903 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
17904 ssSetBlkInfo2Ptr(childS, blkInfo2);
17905 }
17906
17907 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
17908
17909# else
17910
17911 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
17912
17913# endif /* USE_RTMODEL */
17914
17915 /* Allocate memory of model methods 2 */
17916 {
17917 static struct _ssSFcnModelMethods2 methods2;
17918 ssSetModelMethods2(childS, &methods2);
17919 }
17920
17921 /* Allocate memory of model methods 3 */
17922 {
17923 static struct _ssSFcnModelMethods3 methods3;
17924 ssSetModelMethods3(childS, &methods3);
17925 }
17926
17927 /* Allocate memory for states auxilliary information */
17928 {
17929 static struct _ssStatesInfo2 statesInfo2;
17930 static ssPeriodicStatesInfo periodicStatesInfo;
17931 ssSetStatesInfo2(childS, &statesInfo2);
17932 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
17933 }
17934
17935 /* inputs */
17936 {
17937 static struct _ssPortInputs inputPortInfo[3];
17938 _ssSetNumInputPorts(childS, 3);
17939 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
17940
17941 /* port 0 */
17942 {
17943 static real32_T const *sfcnUPtrs[1];
17944 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
17945 ssGetLocalBlockIO(rts))->GeneratedSFunction_bb;
17946 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
17947 _ssSetInputPortNumDimensions(childS, 0, 1);
17948 ssSetInputPortWidth(childS, 0, 1);
17949 }
17950
17951 /* port 1 */
17952 {
17953 static real32_T const *sfcnUPtrs[1];
17954 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled120;
17955 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
17956 _ssSetInputPortNumDimensions(childS, 1, 1);
17957 ssSetInputPortWidth(childS, 1, 1);
17958 }
17959
17960 /* port 2 */
17961 {
17962 static real32_T const *sfcnUPtrs[1];
17963 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled121;
17964 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
17965 _ssSetInputPortNumDimensions(childS, 2, 1);
17966 ssSetInputPortWidth(childS, 2, 1);
17967 }
17968 }
17969
17970 /* outputs */
17971 {
17972 static struct _ssPortOutputs outputPortInfo[1];
17973 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
17974 _ssSetNumOutputPorts(childS, 1);
17975
17976 /* port 0 */
17977 {
17978 _ssSetOutputPortNumDimensions(childS, 0, 1);
17979 ssSetOutputPortWidth(childS, 0, 1);
17980 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
17981 *) ssGetLocalBlockIO(rts))->GeneratedSFunction1_mq));
17982 }
17983 }
17984
17985 /* path info */
17986 _ssSetModelName(childS, "SaturationLimiter_sf");
17987 _ssSetPath(childS,
17988 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/apycLcontrol/PsiControl/Saturation Limiter1/Generated S-Function1");
17989 if (ssGetRTModel(rts) == (NULL)) {
17990 _ssSetParentSS(childS, rts);
17991 _ssSetRootSS(childS, ssGetRootSS(rts));
17992 } else {
17993 ssSetRTModel(childS,ssGetRTModel(rts));
17994 _ssSetParentSS(childS, (NULL));
17995 _ssSetRootSS(childS, childS);
17996 }
17997
17998 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
17999
18000 /* registration */
18001 SaturationLimiter_sf(childS);
18002 sfcnInitializeSizes(childS);
18003 sfcnInitializeSampleTimes(childS);
18004
18005 /* adjust sample time */
18006 ssSetSampleTime(childS, 0, 0.0);
18007 ssSetOffsetTime(childS, 0, 0.0);
18008 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
18009
18010 /* set compiled values of dynamic vector attributes */
18011 ssSetNumNonsampledZCs(childS, 0);
18012
18013 /* Update connectivity flags for each port */
18014 _ssSetInputPortConnected(childS, 0, 1);
18015 _ssSetInputPortConnected(childS, 1, 1);
18016 _ssSetInputPortConnected(childS, 2, 1);
18017 _ssSetOutputPortConnected(childS, 0, 1);
18018 _ssSetOutputPortBeingMerged(childS, 0, 0);
18019
18020 /* Update the BufferDstPort flags for each input port */
18021 _ssSetInputPortBufferDstPort(childS, 0, -1);
18022 _ssSetInputPortBufferDstPort(childS, 1, -1);
18023 _ssSetInputPortBufferDstPort(childS, 2, -1);
18024
18025 /* Instance data for generated S-Function: SaturationLimiter */
18026 {
18027 SimStruct *rts = childS;
18028
18029#include "SaturationLimiter_sfcn_rtw/SaturationLimiter_sid.h"
18030
18031 }
18032 }
18033
18034 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S199>/Generated S-Function (Gain_sf) */
18035 {
18036 SimStruct *childS = ssGetSFunction(rts, 101);
18037
18038 /* timing info */
18039 static time_T sfcnPeriod[1];
18040 static time_T sfcnOffset[1];
18041 static int_T sfcnTsMap[1];
18042 (void) memset((void*)sfcnPeriod, 0,
18043 sizeof(time_T)*1);
18044 (void) memset((void*)sfcnOffset, 0,
18045 sizeof(time_T)*1);
18046 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
18047 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
18048 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
18049
18050 /* Set up the mdlInfo pointer */
18051# ifdef USE_RTMODEL
18052
18053 {
18054 static struct _ssBlkInfo2 _blkInfo2;
18055 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
18056 ssSetBlkInfo2Ptr(childS, blkInfo2);
18057 }
18058
18059 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
18060
18061# else
18062
18063 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
18064
18065# endif /* USE_RTMODEL */
18066
18067 /* Allocate memory of model methods 2 */
18068 {
18069 static struct _ssSFcnModelMethods2 methods2;
18070 ssSetModelMethods2(childS, &methods2);
18071 }
18072
18073 /* Allocate memory of model methods 3 */
18074 {
18075 static struct _ssSFcnModelMethods3 methods3;
18076 ssSetModelMethods3(childS, &methods3);
18077 }
18078
18079 /* Allocate memory for states auxilliary information */
18080 {
18081 static struct _ssStatesInfo2 statesInfo2;
18082 static ssPeriodicStatesInfo periodicStatesInfo;
18083 ssSetStatesInfo2(childS, &statesInfo2);
18084 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
18085 }
18086
18087 /* inputs */
18088 {
18089 static struct _ssPortInputs inputPortInfo[2];
18090 _ssSetNumInputPorts(childS, 2);
18091 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
18092
18093 /* port 0 */
18094 {
18095 static real32_T const *sfcnUPtrs[1];
18096 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
18097 ssGetLocalBlockIO(rts))->GeneratedSFunction1_mq;
18098 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
18099 _ssSetInputPortNumDimensions(childS, 0, 1);
18100 ssSetInputPortWidth(childS, 0, 1);
18101 }
18102
18103 /* port 1 */
18104 {
18105 static real32_T const *sfcnUPtrs[1];
18106 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled122;
18107 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
18108 _ssSetInputPortNumDimensions(childS, 1, 1);
18109 ssSetInputPortWidth(childS, 1, 1);
18110 }
18111 }
18112
18113 /* outputs */
18114 {
18115 static struct _ssPortOutputs outputPortInfo[1];
18116 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
18117 _ssSetNumOutputPorts(childS, 1);
18118
18119 /* port 0 */
18120 {
18121 _ssSetOutputPortNumDimensions(childS, 0, 1);
18122 ssSetOutputPortWidth(childS, 0, 1);
18123 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
18124 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_k5));
18125 }
18126 }
18127
18128 /* path info */
18129 _ssSetModelName(childS, "Gain_sf");
18130 _ssSetPath(childS,
18131 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/apycLcontrol/PsiControl/gain2/Generated S-Function");
18132 if (ssGetRTModel(rts) == (NULL)) {
18133 _ssSetParentSS(childS, rts);
18134 _ssSetRootSS(childS, ssGetRootSS(rts));
18135 } else {
18136 ssSetRTModel(childS,ssGetRTModel(rts));
18137 _ssSetParentSS(childS, (NULL));
18138 _ssSetRootSS(childS, childS);
18139 }
18140
18141 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
18142
18143 /* registration */
18144 Gain_sf(childS);
18145 sfcnInitializeSizes(childS);
18146 sfcnInitializeSampleTimes(childS);
18147
18148 /* adjust sample time */
18149 ssSetSampleTime(childS, 0, 0.0);
18150 ssSetOffsetTime(childS, 0, 0.0);
18151 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
18152
18153 /* set compiled values of dynamic vector attributes */
18154 ssSetNumNonsampledZCs(childS, 0);
18155
18156 /* Update connectivity flags for each port */
18157 _ssSetInputPortConnected(childS, 0, 1);
18158 _ssSetInputPortConnected(childS, 1, 1);
18159 _ssSetOutputPortConnected(childS, 0, 1);
18160 _ssSetOutputPortBeingMerged(childS, 0, 0);
18161
18162 /* Update the BufferDstPort flags for each input port */
18163 _ssSetInputPortBufferDstPort(childS, 0, -1);
18164 _ssSetInputPortBufferDstPort(childS, 1, -1);
18165
18166 /* Instance data for generated S-Function: Gain */
18167 {
18168 SimStruct *rts = childS;
18169
18170#include "Gain_sfcn_rtw/Gain_sid.h"
18171
18172 }
18173 }
18174
18175 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S197>/Generated S-Function2 (LeadLagFilter_sf) */
18176 {
18177 SimStruct *childS = ssGetSFunction(rts, 102);
18178
18179 /* timing info */
18180 static time_T sfcnPeriod[1];
18181 static time_T sfcnOffset[1];
18182 static int_T sfcnTsMap[1];
18183 (void) memset((void*)sfcnPeriod, 0,
18184 sizeof(time_T)*1);
18185 (void) memset((void*)sfcnOffset, 0,
18186 sizeof(time_T)*1);
18187 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
18188 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
18189 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
18190
18191 /* Set up the mdlInfo pointer */
18192# ifdef USE_RTMODEL
18193
18194 {
18195 static struct _ssBlkInfo2 _blkInfo2;
18196 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
18197 ssSetBlkInfo2Ptr(childS, blkInfo2);
18198 }
18199
18200 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
18201
18202# else
18203
18204 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
18205
18206# endif /* USE_RTMODEL */
18207
18208 /* Allocate memory of model methods 2 */
18209 {
18210 static struct _ssSFcnModelMethods2 methods2;
18211 ssSetModelMethods2(childS, &methods2);
18212 }
18213
18214 /* Allocate memory of model methods 3 */
18215 {
18216 static struct _ssSFcnModelMethods3 methods3;
18217 ssSetModelMethods3(childS, &methods3);
18218 }
18219
18220 /* Allocate memory for states auxilliary information */
18221 {
18222 static struct _ssStatesInfo2 statesInfo2;
18223 static ssPeriodicStatesInfo periodicStatesInfo;
18224 ssSetStatesInfo2(childS, &statesInfo2);
18225 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
18226 }
18227
18228 /* inputs */
18229 {
18230 static struct _ssPortInputs inputPortInfo[7];
18231 _ssSetNumInputPorts(childS, 7);
18232 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
18233
18234 /* port 0 */
18235 {
18236 static real32_T const *sfcnUPtrs[1];
18237 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
18238 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReuseS;
18239 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
18240 _ssSetInputPortNumDimensions(childS, 0, 1);
18241 ssSetInputPortWidth(childS, 0, 1);
18242 }
18243
18244 /* port 1 */
18245 {
18246 static int8_T const *sfcnUPtrs[1];
18247 sfcnUPtrs[0] = (int8_T const *) &((B_AFCS_MODEL1_T *)
18248 ssGetLocalBlockIO(rts))->DataTypeConversion1_e;
18249 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
18250 _ssSetInputPortNumDimensions(childS, 1, 1);
18251 ssSetInputPortWidth(childS, 1, 1);
18252 }
18253
18254 /* port 2 */
18255 {
18256 static real32_T const *sfcnUPtrs[1];
18257 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled108;
18258 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
18259 _ssSetInputPortNumDimensions(childS, 2, 1);
18260 ssSetInputPortWidth(childS, 2, 1);
18261 }
18262
18263 /* port 3 */
18264 {
18265 static real32_T const *sfcnUPtrs[1];
18266 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled108;
18267 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
18268 _ssSetInputPortNumDimensions(childS, 3, 1);
18269 ssSetInputPortWidth(childS, 3, 1);
18270 }
18271
18272 /* port 4 */
18273 {
18274 static real32_T const *sfcnUPtrs[1];
18275 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
18276 ssGetLocalBlockIO(rts))->Switch_jf;
18277 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
18278 _ssSetInputPortNumDimensions(childS, 4, 1);
18279 ssSetInputPortWidth(childS, 4, 1);
18280 }
18281
18282 /* port 5 */
18283 {
18284 static real32_T const *sfcnUPtrs[1];
18285 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
18286 ssGetLocalBlockIO(rts))->Switch_jf;
18287 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
18288 _ssSetInputPortNumDimensions(childS, 5, 1);
18289 ssSetInputPortWidth(childS, 5, 1);
18290 }
18291
18292 /* port 6 */
18293 {
18294 static real32_T const *sfcnUPtrs[1];
18295 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
18296 ssGetLocalBlockIO(rts))->GeneratedSFunction_k5;
18297 _ssSetInputPortSignalPtrs(childS, 6, (InputPtrsType)&sfcnUPtrs[0]);
18298 _ssSetInputPortNumDimensions(childS, 6, 1);
18299 ssSetInputPortWidth(childS, 6, 1);
18300 }
18301 }
18302
18303 /* outputs */
18304 {
18305 static struct _ssPortOutputs outputPortInfo[1];
18306 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
18307 _ssSetNumOutputPorts(childS, 1);
18308
18309 /* port 0 */
18310 {
18311 _ssSetOutputPortNumDimensions(childS, 0, 1);
18312 ssSetOutputPortWidth(childS, 0, 1);
18313 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
18314 *) ssGetLocalBlockIO(rts))->GeneratedSFunction2_h));
18315 }
18316 }
18317
18318 /* path info */
18319 _ssSetModelName(childS, "LeadLagFilter_sf");
18320 _ssSetPath(childS,
18321 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/apycLcontrol/PsiControl/Lead lag1/Generated S-Function2");
18322 if (ssGetRTModel(rts) == (NULL)) {
18323 _ssSetParentSS(childS, rts);
18324 _ssSetRootSS(childS, ssGetRootSS(rts));
18325 } else {
18326 ssSetRTModel(childS,ssGetRTModel(rts));
18327 _ssSetParentSS(childS, (NULL));
18328 _ssSetRootSS(childS, childS);
18329 }
18330
18331 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
18332
18333 /* work vectors */
18334 {
18335 static struct _ssDWorkRecord dWorkRecord[4];
18336 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
18337 ssSetSFcnDWork(childS, dWorkRecord);
18338 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
18339 _ssSetNumDWork(childS, 4);
18340
18341 /* DWORK0 */
18342 ssSetDWorkWidth(childS, 0, 1);
18343 ssSetDWorkDataType(childS, 0,SS_SINGLE);
18344 ssSetDWorkComplexSignal(childS, 0, 0);
18345 ssSetDWorkUsedAsDState(childS, 0, 1);
18346 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 223))[0]);
18347
18348 /* DWORK1 */
18349 ssSetDWorkWidth(childS, 1, 1);
18350 ssSetDWorkDataType(childS, 1,SS_SINGLE);
18351 ssSetDWorkComplexSignal(childS, 1, 0);
18352 ssSetDWorkUsedAsDState(childS, 1, 1);
18353 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 224))[0]);
18354
18355 /* DWORK2 */
18356 ssSetDWorkWidth(childS, 2, 1);
18357 ssSetDWorkDataType(childS, 2,SS_INT8);
18358 ssSetDWorkComplexSignal(childS, 2, 0);
18359 ssSetDWorkUsedAsDState(childS, 2, 1);
18360 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 450))[0]);
18361
18362 /* DWORK3 */
18363 ssSetDWorkWidth(childS, 3, 1);
18364 ssSetDWorkDataType(childS, 3,SS_INT8);
18365 ssSetDWorkComplexSignal(childS, 3, 0);
18366 ssSetDWorkUsedAsDState(childS, 3, 1);
18367 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 451))[0]);
18368 }
18369
18370 /* registration */
18371 LeadLagFilter_sf(childS);
18372 sfcnInitializeSizes(childS);
18373 sfcnInitializeSampleTimes(childS);
18374
18375 /* adjust sample time */
18376 ssSetSampleTime(childS, 0, 0.0);
18377 ssSetOffsetTime(childS, 0, 0.0);
18378 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
18379
18380 /* set compiled values of dynamic vector attributes */
18381 ssSetNumNonsampledZCs(childS, 0);
18382
18383 /* Update connectivity flags for each port */
18384 _ssSetInputPortConnected(childS, 0, 1);
18385 _ssSetInputPortConnected(childS, 1, 1);
18386 _ssSetInputPortConnected(childS, 2, 1);
18387 _ssSetInputPortConnected(childS, 3, 1);
18388 _ssSetInputPortConnected(childS, 4, 1);
18389 _ssSetInputPortConnected(childS, 5, 1);
18390 _ssSetInputPortConnected(childS, 6, 1);
18391 _ssSetOutputPortConnected(childS, 0, 1);
18392 _ssSetOutputPortBeingMerged(childS, 0, 0);
18393
18394 /* Update the BufferDstPort flags for each input port */
18395 _ssSetInputPortBufferDstPort(childS, 0, -1);
18396 _ssSetInputPortBufferDstPort(childS, 1, -1);
18397 _ssSetInputPortBufferDstPort(childS, 2, -1);
18398 _ssSetInputPortBufferDstPort(childS, 3, -1);
18399 _ssSetInputPortBufferDstPort(childS, 4, -1);
18400 _ssSetInputPortBufferDstPort(childS, 5, -1);
18401 _ssSetInputPortBufferDstPort(childS, 6, -1);
18402
18403 /* Instance data for generated S-Function: LeadLagFilter */
18404 {
18405 SimStruct *rts = childS;
18406
18407#include "LeadLagFilter_sfcn_rtw/LeadLagFilter_sid.h"
18408
18409 }
18410 }
18411
18412 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S196>/Generated S-Function4 (LagFilter_sf) */
18413 {
18414 SimStruct *childS = ssGetSFunction(rts, 103);
18415
18416 /* timing info */
18417 static time_T sfcnPeriod[1];
18418 static time_T sfcnOffset[1];
18419 static int_T sfcnTsMap[1];
18420 (void) memset((void*)sfcnPeriod, 0,
18421 sizeof(time_T)*1);
18422 (void) memset((void*)sfcnOffset, 0,
18423 sizeof(time_T)*1);
18424 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
18425 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
18426 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
18427
18428 /* Set up the mdlInfo pointer */
18429# ifdef USE_RTMODEL
18430
18431 {
18432 static struct _ssBlkInfo2 _blkInfo2;
18433 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
18434 ssSetBlkInfo2Ptr(childS, blkInfo2);
18435 }
18436
18437 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
18438
18439# else
18440
18441 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
18442
18443# endif /* USE_RTMODEL */
18444
18445 /* Allocate memory of model methods 2 */
18446 {
18447 static struct _ssSFcnModelMethods2 methods2;
18448 ssSetModelMethods2(childS, &methods2);
18449 }
18450
18451 /* Allocate memory of model methods 3 */
18452 {
18453 static struct _ssSFcnModelMethods3 methods3;
18454 ssSetModelMethods3(childS, &methods3);
18455 }
18456
18457 /* Allocate memory for states auxilliary information */
18458 {
18459 static struct _ssStatesInfo2 statesInfo2;
18460 static ssPeriodicStatesInfo periodicStatesInfo;
18461 ssSetStatesInfo2(childS, &statesInfo2);
18462 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
18463 }
18464
18465 /* inputs */
18466 {
18467 static struct _ssPortInputs inputPortInfo[6];
18468 _ssSetNumInputPorts(childS, 6);
18469 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
18470
18471 /* port 0 */
18472 {
18473 static real32_T const *sfcnUPtrs[1];
18474 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
18475 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReuseS;
18476 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
18477 _ssSetInputPortNumDimensions(childS, 0, 1);
18478 ssSetInputPortWidth(childS, 0, 1);
18479 }
18480
18481 /* port 1 */
18482 {
18483 static int8_T const *sfcnUPtrs[1];
18484 sfcnUPtrs[0] = (int8_T const *) &((B_AFCS_MODEL1_T *)
18485 ssGetLocalBlockIO(rts))->DataTypeConversion1_e;
18486 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
18487 _ssSetInputPortNumDimensions(childS, 1, 1);
18488 ssSetInputPortWidth(childS, 1, 1);
18489 }
18490
18491 /* port 2 */
18492 {
18493 static real32_T const *sfcnUPtrs[1];
18494 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled124;
18495 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
18496 _ssSetInputPortNumDimensions(childS, 2, 1);
18497 ssSetInputPortWidth(childS, 2, 1);
18498 }
18499
18500 /* port 3 */
18501 {
18502 static real32_T const *sfcnUPtrs[1];
18503 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
18504 ssGetLocalBlockIO(rts))->Switch_jf;
18505 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
18506 _ssSetInputPortNumDimensions(childS, 3, 1);
18507 ssSetInputPortWidth(childS, 3, 1);
18508 }
18509
18510 /* port 4 */
18511 {
18512 static real32_T const *sfcnUPtrs[1];
18513 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
18514 ssGetLocalBlockIO(rts))->Switch_jf;
18515 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
18516 _ssSetInputPortNumDimensions(childS, 4, 1);
18517 ssSetInputPortWidth(childS, 4, 1);
18518 }
18519
18520 /* port 5 */
18521 {
18522 static real32_T const *sfcnUPtrs[1];
18523 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
18524 ssGetLocalBlockIO(rts))->GeneratedSFunction2_h;
18525 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
18526 _ssSetInputPortNumDimensions(childS, 5, 1);
18527 ssSetInputPortWidth(childS, 5, 1);
18528 }
18529 }
18530
18531 /* outputs */
18532 {
18533 static struct _ssPortOutputs outputPortInfo[1];
18534 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
18535 _ssSetNumOutputPorts(childS, 1);
18536
18537 /* port 0 */
18538 {
18539 _ssSetOutputPortNumDimensions(childS, 0, 1);
18540 ssSetOutputPortWidth(childS, 0, 1);
18541 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
18542 *) ssGetLocalBlockIO(rts))->GeneratedSFunction4_a));
18543 }
18544 }
18545
18546 /* path info */
18547 _ssSetModelName(childS, "LagFilter_sf");
18548 _ssSetPath(childS,
18549 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/apycLcontrol/PsiControl/ lag filter/Generated S-Function4");
18550 if (ssGetRTModel(rts) == (NULL)) {
18551 _ssSetParentSS(childS, rts);
18552 _ssSetRootSS(childS, ssGetRootSS(rts));
18553 } else {
18554 ssSetRTModel(childS,ssGetRTModel(rts));
18555 _ssSetParentSS(childS, (NULL));
18556 _ssSetRootSS(childS, childS);
18557 }
18558
18559 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
18560
18561 /* work vectors */
18562 {
18563 static struct _ssDWorkRecord dWorkRecord[4];
18564 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
18565 ssSetSFcnDWork(childS, dWorkRecord);
18566 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
18567 _ssSetNumDWork(childS, 4);
18568
18569 /* DWORK0 */
18570 ssSetDWorkWidth(childS, 0, 1);
18571 ssSetDWorkDataType(childS, 0,SS_SINGLE);
18572 ssSetDWorkComplexSignal(childS, 0, 0);
18573 ssSetDWorkUsedAsDState(childS, 0, 1);
18574 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 225))[0]);
18575
18576 /* DWORK1 */
18577 ssSetDWorkWidth(childS, 1, 1);
18578 ssSetDWorkDataType(childS, 1,SS_SINGLE);
18579 ssSetDWorkComplexSignal(childS, 1, 0);
18580 ssSetDWorkUsedAsDState(childS, 1, 1);
18581 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 226))[0]);
18582
18583 /* DWORK2 */
18584 ssSetDWorkWidth(childS, 2, 1);
18585 ssSetDWorkDataType(childS, 2,SS_INT8);
18586 ssSetDWorkComplexSignal(childS, 2, 0);
18587 ssSetDWorkUsedAsDState(childS, 2, 1);
18588 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 452))[0]);
18589
18590 /* DWORK3 */
18591 ssSetDWorkWidth(childS, 3, 1);
18592 ssSetDWorkDataType(childS, 3,SS_INT8);
18593 ssSetDWorkComplexSignal(childS, 3, 0);
18594 ssSetDWorkUsedAsDState(childS, 3, 1);
18595 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 453))[0]);
18596 }
18597
18598 /* registration */
18599 LagFilter_sf(childS);
18600 sfcnInitializeSizes(childS);
18601 sfcnInitializeSampleTimes(childS);
18602
18603 /* adjust sample time */
18604 ssSetSampleTime(childS, 0, 0.0);
18605 ssSetOffsetTime(childS, 0, 0.0);
18606 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
18607
18608 /* set compiled values of dynamic vector attributes */
18609 ssSetNumNonsampledZCs(childS, 0);
18610
18611 /* Update connectivity flags for each port */
18612 _ssSetInputPortConnected(childS, 0, 1);
18613 _ssSetInputPortConnected(childS, 1, 1);
18614 _ssSetInputPortConnected(childS, 2, 1);
18615 _ssSetInputPortConnected(childS, 3, 1);
18616 _ssSetInputPortConnected(childS, 4, 1);
18617 _ssSetInputPortConnected(childS, 5, 1);
18618 _ssSetOutputPortConnected(childS, 0, 1);
18619 _ssSetOutputPortBeingMerged(childS, 0, 0);
18620
18621 /* Update the BufferDstPort flags for each input port */
18622 _ssSetInputPortBufferDstPort(childS, 0, -1);
18623 _ssSetInputPortBufferDstPort(childS, 1, -1);
18624 _ssSetInputPortBufferDstPort(childS, 2, -1);
18625 _ssSetInputPortBufferDstPort(childS, 3, -1);
18626 _ssSetInputPortBufferDstPort(childS, 4, -1);
18627 _ssSetInputPortBufferDstPort(childS, 5, -1);
18628
18629 /* Instance data for generated S-Function: LagFilter */
18630 {
18631 SimStruct *rts = childS;
18632
18633#include "LagFilter_sfcn_rtw/LagFilter_sid.h"
18634
18635 }
18636 }
18637
18638 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S204>/Generated S-Function (Gain_sf) */
18639 {
18640 SimStruct *childS = ssGetSFunction(rts, 104);
18641
18642 /* timing info */
18643 static time_T sfcnPeriod[1];
18644 static time_T sfcnOffset[1];
18645 static int_T sfcnTsMap[1];
18646 (void) memset((void*)sfcnPeriod, 0,
18647 sizeof(time_T)*1);
18648 (void) memset((void*)sfcnOffset, 0,
18649 sizeof(time_T)*1);
18650 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
18651 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
18652 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
18653
18654 /* Set up the mdlInfo pointer */
18655# ifdef USE_RTMODEL
18656
18657 {
18658 static struct _ssBlkInfo2 _blkInfo2;
18659 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
18660 ssSetBlkInfo2Ptr(childS, blkInfo2);
18661 }
18662
18663 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
18664
18665# else
18666
18667 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
18668
18669# endif /* USE_RTMODEL */
18670
18671 /* Allocate memory of model methods 2 */
18672 {
18673 static struct _ssSFcnModelMethods2 methods2;
18674 ssSetModelMethods2(childS, &methods2);
18675 }
18676
18677 /* Allocate memory of model methods 3 */
18678 {
18679 static struct _ssSFcnModelMethods3 methods3;
18680 ssSetModelMethods3(childS, &methods3);
18681 }
18682
18683 /* Allocate memory for states auxilliary information */
18684 {
18685 static struct _ssStatesInfo2 statesInfo2;
18686 static ssPeriodicStatesInfo periodicStatesInfo;
18687 ssSetStatesInfo2(childS, &statesInfo2);
18688 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
18689 }
18690
18691 /* inputs */
18692 {
18693 static struct _ssPortInputs inputPortInfo[2];
18694 _ssSetNumInputPorts(childS, 2);
18695 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
18696
18697 /* port 0 */
18698 {
18699 static real32_T const *sfcnUPtrs[1];
18700 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
18701 ssGetLocalBlockIO(rts))->r_n;
18702 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
18703 _ssSetInputPortNumDimensions(childS, 0, 1);
18704 ssSetInputPortWidth(childS, 0, 1);
18705 }
18706
18707 /* port 1 */
18708 {
18709 static real32_T const *sfcnUPtrs[1];
18710 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled105;
18711 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
18712 _ssSetInputPortNumDimensions(childS, 1, 1);
18713 ssSetInputPortWidth(childS, 1, 1);
18714 }
18715 }
18716
18717 /* outputs */
18718 {
18719 static struct _ssPortOutputs outputPortInfo[1];
18720 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
18721 _ssSetNumOutputPorts(childS, 1);
18722
18723 /* port 0 */
18724 {
18725 _ssSetOutputPortNumDimensions(childS, 0, 1);
18726 ssSetOutputPortWidth(childS, 0, 1);
18727 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
18728 *) ssGetLocalBlockIO(rts))->Saturation8));
18729 }
18730 }
18731
18732 /* path info */
18733 _ssSetModelName(childS, "Gain_sf");
18734 _ssSetPath(childS,
18735 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/apycLcontrol/RwyLControl/gain1/Generated S-Function");
18736 if (ssGetRTModel(rts) == (NULL)) {
18737 _ssSetParentSS(childS, rts);
18738 _ssSetRootSS(childS, ssGetRootSS(rts));
18739 } else {
18740 ssSetRTModel(childS,ssGetRTModel(rts));
18741 _ssSetParentSS(childS, (NULL));
18742 _ssSetRootSS(childS, childS);
18743 }
18744
18745 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
18746
18747 /* registration */
18748 Gain_sf(childS);
18749 sfcnInitializeSizes(childS);
18750 sfcnInitializeSampleTimes(childS);
18751
18752 /* adjust sample time */
18753 ssSetSampleTime(childS, 0, 0.0);
18754 ssSetOffsetTime(childS, 0, 0.0);
18755 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
18756
18757 /* set compiled values of dynamic vector attributes */
18758 ssSetNumNonsampledZCs(childS, 0);
18759
18760 /* Update connectivity flags for each port */
18761 _ssSetInputPortConnected(childS, 0, 1);
18762 _ssSetInputPortConnected(childS, 1, 1);
18763 _ssSetOutputPortConnected(childS, 0, 1);
18764 _ssSetOutputPortBeingMerged(childS, 0, 0);
18765
18766 /* Update the BufferDstPort flags for each input port */
18767 _ssSetInputPortBufferDstPort(childS, 0, -1);
18768 _ssSetInputPortBufferDstPort(childS, 1, -1);
18769
18770 /* Instance data for generated S-Function: Gain */
18771 {
18772 SimStruct *rts = childS;
18773
18774#include "Gain_sfcn_rtw/Gain_sid.h"
18775
18776 }
18777 }
18778
18779 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S203>/Generated S-Function1 (SaturationLimiter_sf) */
18780 {
18781 SimStruct *childS = ssGetSFunction(rts, 105);
18782
18783 /* timing info */
18784 static time_T sfcnPeriod[1];
18785 static time_T sfcnOffset[1];
18786 static int_T sfcnTsMap[1];
18787 (void) memset((void*)sfcnPeriod, 0,
18788 sizeof(time_T)*1);
18789 (void) memset((void*)sfcnOffset, 0,
18790 sizeof(time_T)*1);
18791 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
18792 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
18793 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
18794
18795 /* Set up the mdlInfo pointer */
18796# ifdef USE_RTMODEL
18797
18798 {
18799 static struct _ssBlkInfo2 _blkInfo2;
18800 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
18801 ssSetBlkInfo2Ptr(childS, blkInfo2);
18802 }
18803
18804 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
18805
18806# else
18807
18808 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
18809
18810# endif /* USE_RTMODEL */
18811
18812 /* Allocate memory of model methods 2 */
18813 {
18814 static struct _ssSFcnModelMethods2 methods2;
18815 ssSetModelMethods2(childS, &methods2);
18816 }
18817
18818 /* Allocate memory of model methods 3 */
18819 {
18820 static struct _ssSFcnModelMethods3 methods3;
18821 ssSetModelMethods3(childS, &methods3);
18822 }
18823
18824 /* Allocate memory for states auxilliary information */
18825 {
18826 static struct _ssStatesInfo2 statesInfo2;
18827 static ssPeriodicStatesInfo periodicStatesInfo;
18828 ssSetStatesInfo2(childS, &statesInfo2);
18829 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
18830 }
18831
18832 /* inputs */
18833 {
18834 static struct _ssPortInputs inputPortInfo[3];
18835 _ssSetNumInputPorts(childS, 3);
18836 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
18837
18838 /* port 0 */
18839 {
18840 static real32_T const *sfcnUPtrs[1];
18841 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
18842 ssGetLocalBlockIO(rts))->Sum2_eo;
18843 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
18844 _ssSetInputPortNumDimensions(childS, 0, 1);
18845 ssSetInputPortWidth(childS, 0, 1);
18846 }
18847
18848 /* port 1 */
18849 {
18850 static real32_T const *sfcnUPtrs[1];
18851 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled107;
18852 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
18853 _ssSetInputPortNumDimensions(childS, 1, 1);
18854 ssSetInputPortWidth(childS, 1, 1);
18855 }
18856
18857 /* port 2 */
18858 {
18859 static real32_T const *sfcnUPtrs[1];
18860 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled119;
18861 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
18862 _ssSetInputPortNumDimensions(childS, 2, 1);
18863 ssSetInputPortWidth(childS, 2, 1);
18864 }
18865 }
18866
18867 /* outputs */
18868 {
18869 static struct _ssPortOutputs outputPortInfo[1];
18870 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
18871 _ssSetNumOutputPorts(childS, 1);
18872
18873 /* port 0 */
18874 {
18875 _ssSetOutputPortNumDimensions(childS, 0, 1);
18876 ssSetOutputPortWidth(childS, 0, 1);
18877 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
18878 *) ssGetLocalBlockIO(rts))->GeneratedSFunction1_ov));
18879 }
18880 }
18881
18882 /* path info */
18883 _ssSetModelName(childS, "SaturationLimiter_sf");
18884 _ssSetPath(childS,
18885 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/apycLcontrol/RwyLControl/Saturation Limiter3/Generated S-Function1");
18886 if (ssGetRTModel(rts) == (NULL)) {
18887 _ssSetParentSS(childS, rts);
18888 _ssSetRootSS(childS, ssGetRootSS(rts));
18889 } else {
18890 ssSetRTModel(childS,ssGetRTModel(rts));
18891 _ssSetParentSS(childS, (NULL));
18892 _ssSetRootSS(childS, childS);
18893 }
18894
18895 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
18896
18897 /* registration */
18898 SaturationLimiter_sf(childS);
18899 sfcnInitializeSizes(childS);
18900 sfcnInitializeSampleTimes(childS);
18901
18902 /* adjust sample time */
18903 ssSetSampleTime(childS, 0, 0.0);
18904 ssSetOffsetTime(childS, 0, 0.0);
18905 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
18906
18907 /* set compiled values of dynamic vector attributes */
18908 ssSetNumNonsampledZCs(childS, 0);
18909
18910 /* Update connectivity flags for each port */
18911 _ssSetInputPortConnected(childS, 0, 1);
18912 _ssSetInputPortConnected(childS, 1, 1);
18913 _ssSetInputPortConnected(childS, 2, 1);
18914 _ssSetOutputPortConnected(childS, 0, 1);
18915 _ssSetOutputPortBeingMerged(childS, 0, 0);
18916
18917 /* Update the BufferDstPort flags for each input port */
18918 _ssSetInputPortBufferDstPort(childS, 0, -1);
18919 _ssSetInputPortBufferDstPort(childS, 1, -1);
18920 _ssSetInputPortBufferDstPort(childS, 2, -1);
18921
18922 /* Instance data for generated S-Function: SaturationLimiter */
18923 {
18924 SimStruct *rts = childS;
18925
18926#include "SaturationLimiter_sfcn_rtw/SaturationLimiter_sid.h"
18927
18928 }
18929 }
18930
18931 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S206>/Generated S-Function (Gain_sf) */
18932 {
18933 SimStruct *childS = ssGetSFunction(rts, 106);
18934
18935 /* timing info */
18936 static time_T sfcnPeriod[1];
18937 static time_T sfcnOffset[1];
18938 static int_T sfcnTsMap[1];
18939 (void) memset((void*)sfcnPeriod, 0,
18940 sizeof(time_T)*1);
18941 (void) memset((void*)sfcnOffset, 0,
18942 sizeof(time_T)*1);
18943 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
18944 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
18945 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
18946
18947 /* Set up the mdlInfo pointer */
18948# ifdef USE_RTMODEL
18949
18950 {
18951 static struct _ssBlkInfo2 _blkInfo2;
18952 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
18953 ssSetBlkInfo2Ptr(childS, blkInfo2);
18954 }
18955
18956 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
18957
18958# else
18959
18960 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
18961
18962# endif /* USE_RTMODEL */
18963
18964 /* Allocate memory of model methods 2 */
18965 {
18966 static struct _ssSFcnModelMethods2 methods2;
18967 ssSetModelMethods2(childS, &methods2);
18968 }
18969
18970 /* Allocate memory of model methods 3 */
18971 {
18972 static struct _ssSFcnModelMethods3 methods3;
18973 ssSetModelMethods3(childS, &methods3);
18974 }
18975
18976 /* Allocate memory for states auxilliary information */
18977 {
18978 static struct _ssStatesInfo2 statesInfo2;
18979 static ssPeriodicStatesInfo periodicStatesInfo;
18980 ssSetStatesInfo2(childS, &statesInfo2);
18981 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
18982 }
18983
18984 /* inputs */
18985 {
18986 static struct _ssPortInputs inputPortInfo[2];
18987 _ssSetNumInputPorts(childS, 2);
18988 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
18989
18990 /* port 0 */
18991 {
18992 static real32_T const *sfcnUPtrs[1];
18993 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
18994 ssGetLocalBlockIO(rts))->GeneratedSFunction1_ov;
18995 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
18996 _ssSetInputPortNumDimensions(childS, 0, 1);
18997 ssSetInputPortWidth(childS, 0, 1);
18998 }
18999
19000 /* port 1 */
19001 {
19002 static real32_T const *sfcnUPtrs[1];
19003 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled109;
19004 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
19005 _ssSetInputPortNumDimensions(childS, 1, 1);
19006 ssSetInputPortWidth(childS, 1, 1);
19007 }
19008 }
19009
19010 /* outputs */
19011 {
19012 static struct _ssPortOutputs outputPortInfo[1];
19013 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
19014 _ssSetNumOutputPorts(childS, 1);
19015
19016 /* port 0 */
19017 {
19018 _ssSetOutputPortNumDimensions(childS, 0, 1);
19019 ssSetOutputPortWidth(childS, 0, 1);
19020 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
19021 *) ssGetLocalBlockIO(rts))->MinMax));
19022 }
19023 }
19024
19025 /* path info */
19026 _ssSetModelName(childS, "Gain_sf");
19027 _ssSetPath(childS,
19028 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/apycLcontrol/RwyLControl/gain3/Generated S-Function");
19029 if (ssGetRTModel(rts) == (NULL)) {
19030 _ssSetParentSS(childS, rts);
19031 _ssSetRootSS(childS, ssGetRootSS(rts));
19032 } else {
19033 ssSetRTModel(childS,ssGetRTModel(rts));
19034 _ssSetParentSS(childS, (NULL));
19035 _ssSetRootSS(childS, childS);
19036 }
19037
19038 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
19039
19040 /* registration */
19041 Gain_sf(childS);
19042 sfcnInitializeSizes(childS);
19043 sfcnInitializeSampleTimes(childS);
19044
19045 /* adjust sample time */
19046 ssSetSampleTime(childS, 0, 0.0);
19047 ssSetOffsetTime(childS, 0, 0.0);
19048 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
19049
19050 /* set compiled values of dynamic vector attributes */
19051 ssSetNumNonsampledZCs(childS, 0);
19052
19053 /* Update connectivity flags for each port */
19054 _ssSetInputPortConnected(childS, 0, 1);
19055 _ssSetInputPortConnected(childS, 1, 1);
19056 _ssSetOutputPortConnected(childS, 0, 1);
19057 _ssSetOutputPortBeingMerged(childS, 0, 0);
19058
19059 /* Update the BufferDstPort flags for each input port */
19060 _ssSetInputPortBufferDstPort(childS, 0, -1);
19061 _ssSetInputPortBufferDstPort(childS, 1, -1);
19062
19063 /* Instance data for generated S-Function: Gain */
19064 {
19065 SimStruct *rts = childS;
19066
19067#include "Gain_sfcn_rtw/Gain_sid.h"
19068
19069 }
19070 }
19071
19072 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S194>/Generated S-Function6 (Res180_sf) */
19073 {
19074 SimStruct *childS = ssGetSFunction(rts, 107);
19075
19076 /* timing info */
19077 static time_T sfcnPeriod[1];
19078 static time_T sfcnOffset[1];
19079 static int_T sfcnTsMap[1];
19080 (void) memset((void*)sfcnPeriod, 0,
19081 sizeof(time_T)*1);
19082 (void) memset((void*)sfcnOffset, 0,
19083 sizeof(time_T)*1);
19084 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
19085 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
19086 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
19087
19088 /* Set up the mdlInfo pointer */
19089# ifdef USE_RTMODEL
19090
19091 {
19092 static struct _ssBlkInfo2 _blkInfo2;
19093 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
19094 ssSetBlkInfo2Ptr(childS, blkInfo2);
19095 }
19096
19097 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
19098
19099# else
19100
19101 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
19102
19103# endif /* USE_RTMODEL */
19104
19105 /* Allocate memory of model methods 2 */
19106 {
19107 static struct _ssSFcnModelMethods2 methods2;
19108 ssSetModelMethods2(childS, &methods2);
19109 }
19110
19111 /* Allocate memory of model methods 3 */
19112 {
19113 static struct _ssSFcnModelMethods3 methods3;
19114 ssSetModelMethods3(childS, &methods3);
19115 }
19116
19117 /* Allocate memory for states auxilliary information */
19118 {
19119 static struct _ssStatesInfo2 statesInfo2;
19120 static ssPeriodicStatesInfo periodicStatesInfo;
19121 ssSetStatesInfo2(childS, &statesInfo2);
19122 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
19123 }
19124
19125 /* inputs */
19126 {
19127 static struct _ssPortInputs inputPortInfo[1];
19128 _ssSetNumInputPorts(childS, 1);
19129 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
19130
19131 /* port 0 */
19132 {
19133 static real32_T const *sfcnUPtrs[1];
19134 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
19135 ssGetLocalBlockIO(rts))->Sum3_k;
19136 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
19137 _ssSetInputPortNumDimensions(childS, 0, 1);
19138 ssSetInputPortWidth(childS, 0, 1);
19139 }
19140 }
19141
19142 /* outputs */
19143 {
19144 static struct _ssPortOutputs outputPortInfo[1];
19145 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
19146 _ssSetNumOutputPorts(childS, 1);
19147
19148 /* port 0 */
19149 {
19150 _ssSetOutputPortNumDimensions(childS, 0, 1);
19151 ssSetOutputPortWidth(childS, 0, 1);
19152 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
19153 *) ssGetLocalBlockIO(rts))->GeneratedSFunction6_aa));
19154 }
19155 }
19156
19157 /* path info */
19158 _ssSetModelName(childS, "Res180_sf");
19159 _ssSetPath(childS,
19160 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/apycLcontrol/RwyLControl/Generated S-Function6");
19161 if (ssGetRTModel(rts) == (NULL)) {
19162 _ssSetParentSS(childS, rts);
19163 _ssSetRootSS(childS, ssGetRootSS(rts));
19164 } else {
19165 ssSetRTModel(childS,ssGetRTModel(rts));
19166 _ssSetParentSS(childS, (NULL));
19167 _ssSetRootSS(childS, childS);
19168 }
19169
19170 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
19171
19172 /* registration */
19173 Res180_sf(childS);
19174 sfcnInitializeSizes(childS);
19175 sfcnInitializeSampleTimes(childS);
19176
19177 /* adjust sample time */
19178 ssSetSampleTime(childS, 0, 0.0);
19179 ssSetOffsetTime(childS, 0, 0.0);
19180 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
19181
19182 /* set compiled values of dynamic vector attributes */
19183 ssSetNumNonsampledZCs(childS, 0);
19184
19185 /* Update connectivity flags for each port */
19186 _ssSetInputPortConnected(childS, 0, 1);
19187 _ssSetOutputPortConnected(childS, 0, 1);
19188 _ssSetOutputPortBeingMerged(childS, 0, 0);
19189
19190 /* Update the BufferDstPort flags for each input port */
19191 _ssSetInputPortBufferDstPort(childS, 0, -1);
19192
19193 /* Instance data for generated S-Function: Res180 */
19194 {
19195 SimStruct *rts = childS;
19196
19197#include "Res180_sfcn_rtw/Res180_sid.h"
19198
19199 }
19200 }
19201
19202 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S202>/Generated S-Function1 (SaturationLimiter_sf) */
19203 {
19204 SimStruct *childS = ssGetSFunction(rts, 108);
19205
19206 /* timing info */
19207 static time_T sfcnPeriod[1];
19208 static time_T sfcnOffset[1];
19209 static int_T sfcnTsMap[1];
19210 (void) memset((void*)sfcnPeriod, 0,
19211 sizeof(time_T)*1);
19212 (void) memset((void*)sfcnOffset, 0,
19213 sizeof(time_T)*1);
19214 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
19215 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
19216 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
19217
19218 /* Set up the mdlInfo pointer */
19219# ifdef USE_RTMODEL
19220
19221 {
19222 static struct _ssBlkInfo2 _blkInfo2;
19223 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
19224 ssSetBlkInfo2Ptr(childS, blkInfo2);
19225 }
19226
19227 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
19228
19229# else
19230
19231 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
19232
19233# endif /* USE_RTMODEL */
19234
19235 /* Allocate memory of model methods 2 */
19236 {
19237 static struct _ssSFcnModelMethods2 methods2;
19238 ssSetModelMethods2(childS, &methods2);
19239 }
19240
19241 /* Allocate memory of model methods 3 */
19242 {
19243 static struct _ssSFcnModelMethods3 methods3;
19244 ssSetModelMethods3(childS, &methods3);
19245 }
19246
19247 /* Allocate memory for states auxilliary information */
19248 {
19249 static struct _ssStatesInfo2 statesInfo2;
19250 static ssPeriodicStatesInfo periodicStatesInfo;
19251 ssSetStatesInfo2(childS, &statesInfo2);
19252 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
19253 }
19254
19255 /* inputs */
19256 {
19257 static struct _ssPortInputs inputPortInfo[3];
19258 _ssSetNumInputPorts(childS, 3);
19259 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
19260
19261 /* port 0 */
19262 {
19263 static real32_T const *sfcnUPtrs[1];
19264 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
19265 ssGetLocalBlockIO(rts))->GeneratedSFunction6_aa;
19266 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
19267 _ssSetInputPortNumDimensions(childS, 0, 1);
19268 ssSetInputPortWidth(childS, 0, 1);
19269 }
19270
19271 /* port 1 */
19272 {
19273 static real32_T const *sfcnUPtrs[1];
19274 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled120;
19275 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
19276 _ssSetInputPortNumDimensions(childS, 1, 1);
19277 ssSetInputPortWidth(childS, 1, 1);
19278 }
19279
19280 /* port 2 */
19281 {
19282 static real32_T const *sfcnUPtrs[1];
19283 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled121;
19284 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
19285 _ssSetInputPortNumDimensions(childS, 2, 1);
19286 ssSetInputPortWidth(childS, 2, 1);
19287 }
19288 }
19289
19290 /* outputs */
19291 {
19292 static struct _ssPortOutputs outputPortInfo[1];
19293 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
19294 _ssSetNumOutputPorts(childS, 1);
19295
19296 /* port 0 */
19297 {
19298 _ssSetOutputPortNumDimensions(childS, 0, 1);
19299 ssSetOutputPortWidth(childS, 0, 1);
19300 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
19301 *) ssGetLocalBlockIO(rts))->GeneratedSFunction1_dm));
19302 }
19303 }
19304
19305 /* path info */
19306 _ssSetModelName(childS, "SaturationLimiter_sf");
19307 _ssSetPath(childS,
19308 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/apycLcontrol/RwyLControl/Saturation Limiter1/Generated S-Function1");
19309 if (ssGetRTModel(rts) == (NULL)) {
19310 _ssSetParentSS(childS, rts);
19311 _ssSetRootSS(childS, ssGetRootSS(rts));
19312 } else {
19313 ssSetRTModel(childS,ssGetRTModel(rts));
19314 _ssSetParentSS(childS, (NULL));
19315 _ssSetRootSS(childS, childS);
19316 }
19317
19318 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
19319
19320 /* registration */
19321 SaturationLimiter_sf(childS);
19322 sfcnInitializeSizes(childS);
19323 sfcnInitializeSampleTimes(childS);
19324
19325 /* adjust sample time */
19326 ssSetSampleTime(childS, 0, 0.0);
19327 ssSetOffsetTime(childS, 0, 0.0);
19328 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
19329
19330 /* set compiled values of dynamic vector attributes */
19331 ssSetNumNonsampledZCs(childS, 0);
19332
19333 /* Update connectivity flags for each port */
19334 _ssSetInputPortConnected(childS, 0, 1);
19335 _ssSetInputPortConnected(childS, 1, 1);
19336 _ssSetInputPortConnected(childS, 2, 1);
19337 _ssSetOutputPortConnected(childS, 0, 1);
19338 _ssSetOutputPortBeingMerged(childS, 0, 0);
19339
19340 /* Update the BufferDstPort flags for each input port */
19341 _ssSetInputPortBufferDstPort(childS, 0, -1);
19342 _ssSetInputPortBufferDstPort(childS, 1, -1);
19343 _ssSetInputPortBufferDstPort(childS, 2, -1);
19344
19345 /* Instance data for generated S-Function: SaturationLimiter */
19346 {
19347 SimStruct *rts = childS;
19348
19349#include "SaturationLimiter_sfcn_rtw/SaturationLimiter_sid.h"
19350
19351 }
19352 }
19353
19354 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S205>/Generated S-Function (Gain_sf) */
19355 {
19356 SimStruct *childS = ssGetSFunction(rts, 109);
19357
19358 /* timing info */
19359 static time_T sfcnPeriod[1];
19360 static time_T sfcnOffset[1];
19361 static int_T sfcnTsMap[1];
19362 (void) memset((void*)sfcnPeriod, 0,
19363 sizeof(time_T)*1);
19364 (void) memset((void*)sfcnOffset, 0,
19365 sizeof(time_T)*1);
19366 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
19367 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
19368 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
19369
19370 /* Set up the mdlInfo pointer */
19371# ifdef USE_RTMODEL
19372
19373 {
19374 static struct _ssBlkInfo2 _blkInfo2;
19375 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
19376 ssSetBlkInfo2Ptr(childS, blkInfo2);
19377 }
19378
19379 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
19380
19381# else
19382
19383 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
19384
19385# endif /* USE_RTMODEL */
19386
19387 /* Allocate memory of model methods 2 */
19388 {
19389 static struct _ssSFcnModelMethods2 methods2;
19390 ssSetModelMethods2(childS, &methods2);
19391 }
19392
19393 /* Allocate memory of model methods 3 */
19394 {
19395 static struct _ssSFcnModelMethods3 methods3;
19396 ssSetModelMethods3(childS, &methods3);
19397 }
19398
19399 /* Allocate memory for states auxilliary information */
19400 {
19401 static struct _ssStatesInfo2 statesInfo2;
19402 static ssPeriodicStatesInfo periodicStatesInfo;
19403 ssSetStatesInfo2(childS, &statesInfo2);
19404 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
19405 }
19406
19407 /* inputs */
19408 {
19409 static struct _ssPortInputs inputPortInfo[2];
19410 _ssSetNumInputPorts(childS, 2);
19411 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
19412
19413 /* port 0 */
19414 {
19415 static real32_T const *sfcnUPtrs[1];
19416 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
19417 ssGetLocalBlockIO(rts))->GeneratedSFunction1_dm;
19418 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
19419 _ssSetInputPortNumDimensions(childS, 0, 1);
19420 ssSetInputPortWidth(childS, 0, 1);
19421 }
19422
19423 /* port 1 */
19424 {
19425 static real32_T const *sfcnUPtrs[1];
19426 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled114;
19427 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
19428 _ssSetInputPortNumDimensions(childS, 1, 1);
19429 ssSetInputPortWidth(childS, 1, 1);
19430 }
19431 }
19432
19433 /* outputs */
19434 {
19435 static struct _ssPortOutputs outputPortInfo[1];
19436 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
19437 _ssSetNumOutputPorts(childS, 1);
19438
19439 /* port 0 */
19440 {
19441 _ssSetOutputPortNumDimensions(childS, 0, 1);
19442 ssSetOutputPortWidth(childS, 0, 1);
19443 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
19444 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_pk));
19445 }
19446 }
19447
19448 /* path info */
19449 _ssSetModelName(childS, "Gain_sf");
19450 _ssSetPath(childS,
19451 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/apycLcontrol/RwyLControl/gain2/Generated S-Function");
19452 if (ssGetRTModel(rts) == (NULL)) {
19453 _ssSetParentSS(childS, rts);
19454 _ssSetRootSS(childS, ssGetRootSS(rts));
19455 } else {
19456 ssSetRTModel(childS,ssGetRTModel(rts));
19457 _ssSetParentSS(childS, (NULL));
19458 _ssSetRootSS(childS, childS);
19459 }
19460
19461 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
19462
19463 /* registration */
19464 Gain_sf(childS);
19465 sfcnInitializeSizes(childS);
19466 sfcnInitializeSampleTimes(childS);
19467
19468 /* adjust sample time */
19469 ssSetSampleTime(childS, 0, 0.0);
19470 ssSetOffsetTime(childS, 0, 0.0);
19471 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
19472
19473 /* set compiled values of dynamic vector attributes */
19474 ssSetNumNonsampledZCs(childS, 0);
19475
19476 /* Update connectivity flags for each port */
19477 _ssSetInputPortConnected(childS, 0, 1);
19478 _ssSetInputPortConnected(childS, 1, 1);
19479 _ssSetOutputPortConnected(childS, 0, 1);
19480 _ssSetOutputPortBeingMerged(childS, 0, 0);
19481
19482 /* Update the BufferDstPort flags for each input port */
19483 _ssSetInputPortBufferDstPort(childS, 0, -1);
19484 _ssSetInputPortBufferDstPort(childS, 1, -1);
19485
19486 /* Instance data for generated S-Function: Gain */
19487 {
19488 SimStruct *rts = childS;
19489
19490#include "Gain_sfcn_rtw/Gain_sid.h"
19491
19492 }
19493 }
19494
19495 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S201>/Generated S-Function2 (LeadLagFilter_sf) */
19496 {
19497 SimStruct *childS = ssGetSFunction(rts, 110);
19498
19499 /* timing info */
19500 static time_T sfcnPeriod[1];
19501 static time_T sfcnOffset[1];
19502 static int_T sfcnTsMap[1];
19503 (void) memset((void*)sfcnPeriod, 0,
19504 sizeof(time_T)*1);
19505 (void) memset((void*)sfcnOffset, 0,
19506 sizeof(time_T)*1);
19507 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
19508 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
19509 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
19510
19511 /* Set up the mdlInfo pointer */
19512# ifdef USE_RTMODEL
19513
19514 {
19515 static struct _ssBlkInfo2 _blkInfo2;
19516 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
19517 ssSetBlkInfo2Ptr(childS, blkInfo2);
19518 }
19519
19520 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
19521
19522# else
19523
19524 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
19525
19526# endif /* USE_RTMODEL */
19527
19528 /* Allocate memory of model methods 2 */
19529 {
19530 static struct _ssSFcnModelMethods2 methods2;
19531 ssSetModelMethods2(childS, &methods2);
19532 }
19533
19534 /* Allocate memory of model methods 3 */
19535 {
19536 static struct _ssSFcnModelMethods3 methods3;
19537 ssSetModelMethods3(childS, &methods3);
19538 }
19539
19540 /* Allocate memory for states auxilliary information */
19541 {
19542 static struct _ssStatesInfo2 statesInfo2;
19543 static ssPeriodicStatesInfo periodicStatesInfo;
19544 ssSetStatesInfo2(childS, &statesInfo2);
19545 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
19546 }
19547
19548 /* inputs */
19549 {
19550 static struct _ssPortInputs inputPortInfo[7];
19551 _ssSetNumInputPorts(childS, 7);
19552 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
19553
19554 /* port 0 */
19555 {
19556 static real32_T const *sfcnUPtrs[1];
19557 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
19558 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReuseS;
19559 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
19560 _ssSetInputPortNumDimensions(childS, 0, 1);
19561 ssSetInputPortWidth(childS, 0, 1);
19562 }
19563
19564 /* port 1 */
19565 {
19566 static int8_T const *sfcnUPtrs[1];
19567 sfcnUPtrs[0] = (int8_T const *) &((B_AFCS_MODEL1_T *)
19568 ssGetLocalBlockIO(rts))->DataTypeConversion2_j;
19569 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
19570 _ssSetInputPortNumDimensions(childS, 1, 1);
19571 ssSetInputPortWidth(childS, 1, 1);
19572 }
19573
19574 /* port 2 */
19575 {
19576 static real32_T const *sfcnUPtrs[1];
19577 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled108;
19578 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
19579 _ssSetInputPortNumDimensions(childS, 2, 1);
19580 ssSetInputPortWidth(childS, 2, 1);
19581 }
19582
19583 /* port 3 */
19584 {
19585 static real32_T const *sfcnUPtrs[1];
19586 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled108;
19587 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
19588 _ssSetInputPortNumDimensions(childS, 3, 1);
19589 ssSetInputPortWidth(childS, 3, 1);
19590 }
19591
19592 /* port 4 */
19593 {
19594 static real32_T const *sfcnUPtrs[1];
19595 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
19596 ssGetLocalBlockIO(rts))->Switch_jf;
19597 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
19598 _ssSetInputPortNumDimensions(childS, 4, 1);
19599 ssSetInputPortWidth(childS, 4, 1);
19600 }
19601
19602 /* port 5 */
19603 {
19604 static real32_T const *sfcnUPtrs[1];
19605 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
19606 ssGetLocalBlockIO(rts))->Switch_jf;
19607 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
19608 _ssSetInputPortNumDimensions(childS, 5, 1);
19609 ssSetInputPortWidth(childS, 5, 1);
19610 }
19611
19612 /* port 6 */
19613 {
19614 static real32_T const *sfcnUPtrs[1];
19615 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
19616 ssGetLocalBlockIO(rts))->GeneratedSFunction_pk;
19617 _ssSetInputPortSignalPtrs(childS, 6, (InputPtrsType)&sfcnUPtrs[0]);
19618 _ssSetInputPortNumDimensions(childS, 6, 1);
19619 ssSetInputPortWidth(childS, 6, 1);
19620 }
19621 }
19622
19623 /* outputs */
19624 {
19625 static struct _ssPortOutputs outputPortInfo[1];
19626 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
19627 _ssSetNumOutputPorts(childS, 1);
19628
19629 /* port 0 */
19630 {
19631 _ssSetOutputPortNumDimensions(childS, 0, 1);
19632 ssSetOutputPortWidth(childS, 0, 1);
19633 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
19634 *) ssGetLocalBlockIO(rts))->MinMax));
19635 }
19636 }
19637
19638 /* path info */
19639 _ssSetModelName(childS, "LeadLagFilter_sf");
19640 _ssSetPath(childS,
19641 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/apycLcontrol/RwyLControl/Lead lag1/Generated S-Function2");
19642 if (ssGetRTModel(rts) == (NULL)) {
19643 _ssSetParentSS(childS, rts);
19644 _ssSetRootSS(childS, ssGetRootSS(rts));
19645 } else {
19646 ssSetRTModel(childS,ssGetRTModel(rts));
19647 _ssSetParentSS(childS, (NULL));
19648 _ssSetRootSS(childS, childS);
19649 }
19650
19651 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
19652
19653 /* work vectors */
19654 {
19655 static struct _ssDWorkRecord dWorkRecord[4];
19656 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
19657 ssSetSFcnDWork(childS, dWorkRecord);
19658 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
19659 _ssSetNumDWork(childS, 4);
19660
19661 /* DWORK0 */
19662 ssSetDWorkWidth(childS, 0, 1);
19663 ssSetDWorkDataType(childS, 0,SS_SINGLE);
19664 ssSetDWorkComplexSignal(childS, 0, 0);
19665 ssSetDWorkUsedAsDState(childS, 0, 1);
19666 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 227))[0]);
19667
19668 /* DWORK1 */
19669 ssSetDWorkWidth(childS, 1, 1);
19670 ssSetDWorkDataType(childS, 1,SS_SINGLE);
19671 ssSetDWorkComplexSignal(childS, 1, 0);
19672 ssSetDWorkUsedAsDState(childS, 1, 1);
19673 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 228))[0]);
19674
19675 /* DWORK2 */
19676 ssSetDWorkWidth(childS, 2, 1);
19677 ssSetDWorkDataType(childS, 2,SS_INT8);
19678 ssSetDWorkComplexSignal(childS, 2, 0);
19679 ssSetDWorkUsedAsDState(childS, 2, 1);
19680 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 454))[0]);
19681
19682 /* DWORK3 */
19683 ssSetDWorkWidth(childS, 3, 1);
19684 ssSetDWorkDataType(childS, 3,SS_INT8);
19685 ssSetDWorkComplexSignal(childS, 3, 0);
19686 ssSetDWorkUsedAsDState(childS, 3, 1);
19687 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 455))[0]);
19688 }
19689
19690 /* registration */
19691 LeadLagFilter_sf(childS);
19692 sfcnInitializeSizes(childS);
19693 sfcnInitializeSampleTimes(childS);
19694
19695 /* adjust sample time */
19696 ssSetSampleTime(childS, 0, 0.0);
19697 ssSetOffsetTime(childS, 0, 0.0);
19698 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
19699
19700 /* set compiled values of dynamic vector attributes */
19701 ssSetNumNonsampledZCs(childS, 0);
19702
19703 /* Update connectivity flags for each port */
19704 _ssSetInputPortConnected(childS, 0, 1);
19705 _ssSetInputPortConnected(childS, 1, 1);
19706 _ssSetInputPortConnected(childS, 2, 1);
19707 _ssSetInputPortConnected(childS, 3, 1);
19708 _ssSetInputPortConnected(childS, 4, 1);
19709 _ssSetInputPortConnected(childS, 5, 1);
19710 _ssSetInputPortConnected(childS, 6, 1);
19711 _ssSetOutputPortConnected(childS, 0, 1);
19712 _ssSetOutputPortBeingMerged(childS, 0, 0);
19713
19714 /* Update the BufferDstPort flags for each input port */
19715 _ssSetInputPortBufferDstPort(childS, 0, -1);
19716 _ssSetInputPortBufferDstPort(childS, 1, -1);
19717 _ssSetInputPortBufferDstPort(childS, 2, -1);
19718 _ssSetInputPortBufferDstPort(childS, 3, -1);
19719 _ssSetInputPortBufferDstPort(childS, 4, -1);
19720 _ssSetInputPortBufferDstPort(childS, 5, -1);
19721 _ssSetInputPortBufferDstPort(childS, 6, -1);
19722
19723 /* Instance data for generated S-Function: LeadLagFilter */
19724 {
19725 SimStruct *rts = childS;
19726
19727#include "LeadLagFilter_sfcn_rtw/LeadLagFilter_sid.h"
19728
19729 }
19730 }
19731
19732 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S200>/Generated S-Function4 (LagFilter_sf) */
19733 {
19734 SimStruct *childS = ssGetSFunction(rts, 111);
19735
19736 /* timing info */
19737 static time_T sfcnPeriod[1];
19738 static time_T sfcnOffset[1];
19739 static int_T sfcnTsMap[1];
19740 (void) memset((void*)sfcnPeriod, 0,
19741 sizeof(time_T)*1);
19742 (void) memset((void*)sfcnOffset, 0,
19743 sizeof(time_T)*1);
19744 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
19745 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
19746 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
19747
19748 /* Set up the mdlInfo pointer */
19749# ifdef USE_RTMODEL
19750
19751 {
19752 static struct _ssBlkInfo2 _blkInfo2;
19753 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
19754 ssSetBlkInfo2Ptr(childS, blkInfo2);
19755 }
19756
19757 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
19758
19759# else
19760
19761 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
19762
19763# endif /* USE_RTMODEL */
19764
19765 /* Allocate memory of model methods 2 */
19766 {
19767 static struct _ssSFcnModelMethods2 methods2;
19768 ssSetModelMethods2(childS, &methods2);
19769 }
19770
19771 /* Allocate memory of model methods 3 */
19772 {
19773 static struct _ssSFcnModelMethods3 methods3;
19774 ssSetModelMethods3(childS, &methods3);
19775 }
19776
19777 /* Allocate memory for states auxilliary information */
19778 {
19779 static struct _ssStatesInfo2 statesInfo2;
19780 static ssPeriodicStatesInfo periodicStatesInfo;
19781 ssSetStatesInfo2(childS, &statesInfo2);
19782 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
19783 }
19784
19785 /* inputs */
19786 {
19787 static struct _ssPortInputs inputPortInfo[6];
19788 _ssSetNumInputPorts(childS, 6);
19789 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
19790
19791 /* port 0 */
19792 {
19793 static real32_T const *sfcnUPtrs[1];
19794 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
19795 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReuseS;
19796 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
19797 _ssSetInputPortNumDimensions(childS, 0, 1);
19798 ssSetInputPortWidth(childS, 0, 1);
19799 }
19800
19801 /* port 1 */
19802 {
19803 static int8_T const *sfcnUPtrs[1];
19804 sfcnUPtrs[0] = (int8_T const *) &((B_AFCS_MODEL1_T *)
19805 ssGetLocalBlockIO(rts))->DataTypeConversion2_j;
19806 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
19807 _ssSetInputPortNumDimensions(childS, 1, 1);
19808 ssSetInputPortWidth(childS, 1, 1);
19809 }
19810
19811 /* port 2 */
19812 {
19813 static real32_T const *sfcnUPtrs[1];
19814 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled124;
19815 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
19816 _ssSetInputPortNumDimensions(childS, 2, 1);
19817 ssSetInputPortWidth(childS, 2, 1);
19818 }
19819
19820 /* port 3 */
19821 {
19822 static real32_T const *sfcnUPtrs[1];
19823 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
19824 ssGetLocalBlockIO(rts))->Switch_jf;
19825 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
19826 _ssSetInputPortNumDimensions(childS, 3, 1);
19827 ssSetInputPortWidth(childS, 3, 1);
19828 }
19829
19830 /* port 4 */
19831 {
19832 static real32_T const *sfcnUPtrs[1];
19833 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
19834 ssGetLocalBlockIO(rts))->Switch_jf;
19835 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
19836 _ssSetInputPortNumDimensions(childS, 4, 1);
19837 ssSetInputPortWidth(childS, 4, 1);
19838 }
19839
19840 /* port 5 */
19841 {
19842 static real32_T const *sfcnUPtrs[1];
19843 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
19844 ssGetLocalBlockIO(rts))->Sum1_k;
19845 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
19846 _ssSetInputPortNumDimensions(childS, 5, 1);
19847 ssSetInputPortWidth(childS, 5, 1);
19848 }
19849 }
19850
19851 /* outputs */
19852 {
19853 static struct _ssPortOutputs outputPortInfo[1];
19854 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
19855 _ssSetNumOutputPorts(childS, 1);
19856
19857 /* port 0 */
19858 {
19859 _ssSetOutputPortNumDimensions(childS, 0, 1);
19860 ssSetOutputPortWidth(childS, 0, 1);
19861 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
19862 *) ssGetLocalBlockIO(rts))->GeneratedSFunction4_j));
19863 }
19864 }
19865
19866 /* path info */
19867 _ssSetModelName(childS, "LagFilter_sf");
19868 _ssSetPath(childS,
19869 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/apycLcontrol/RwyLControl/ lag filter/Generated S-Function4");
19870 if (ssGetRTModel(rts) == (NULL)) {
19871 _ssSetParentSS(childS, rts);
19872 _ssSetRootSS(childS, ssGetRootSS(rts));
19873 } else {
19874 ssSetRTModel(childS,ssGetRTModel(rts));
19875 _ssSetParentSS(childS, (NULL));
19876 _ssSetRootSS(childS, childS);
19877 }
19878
19879 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
19880
19881 /* work vectors */
19882 {
19883 static struct _ssDWorkRecord dWorkRecord[4];
19884 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
19885 ssSetSFcnDWork(childS, dWorkRecord);
19886 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
19887 _ssSetNumDWork(childS, 4);
19888
19889 /* DWORK0 */
19890 ssSetDWorkWidth(childS, 0, 1);
19891 ssSetDWorkDataType(childS, 0,SS_SINGLE);
19892 ssSetDWorkComplexSignal(childS, 0, 0);
19893 ssSetDWorkUsedAsDState(childS, 0, 1);
19894 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 229))[0]);
19895
19896 /* DWORK1 */
19897 ssSetDWorkWidth(childS, 1, 1);
19898 ssSetDWorkDataType(childS, 1,SS_SINGLE);
19899 ssSetDWorkComplexSignal(childS, 1, 0);
19900 ssSetDWorkUsedAsDState(childS, 1, 1);
19901 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 230))[0]);
19902
19903 /* DWORK2 */
19904 ssSetDWorkWidth(childS, 2, 1);
19905 ssSetDWorkDataType(childS, 2,SS_INT8);
19906 ssSetDWorkComplexSignal(childS, 2, 0);
19907 ssSetDWorkUsedAsDState(childS, 2, 1);
19908 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 456))[0]);
19909
19910 /* DWORK3 */
19911 ssSetDWorkWidth(childS, 3, 1);
19912 ssSetDWorkDataType(childS, 3,SS_INT8);
19913 ssSetDWorkComplexSignal(childS, 3, 0);
19914 ssSetDWorkUsedAsDState(childS, 3, 1);
19915 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 457))[0]);
19916 }
19917
19918 /* registration */
19919 LagFilter_sf(childS);
19920 sfcnInitializeSizes(childS);
19921 sfcnInitializeSampleTimes(childS);
19922
19923 /* adjust sample time */
19924 ssSetSampleTime(childS, 0, 0.0);
19925 ssSetOffsetTime(childS, 0, 0.0);
19926 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
19927
19928 /* set compiled values of dynamic vector attributes */
19929 ssSetNumNonsampledZCs(childS, 0);
19930
19931 /* Update connectivity flags for each port */
19932 _ssSetInputPortConnected(childS, 0, 1);
19933 _ssSetInputPortConnected(childS, 1, 1);
19934 _ssSetInputPortConnected(childS, 2, 1);
19935 _ssSetInputPortConnected(childS, 3, 1);
19936 _ssSetInputPortConnected(childS, 4, 1);
19937 _ssSetInputPortConnected(childS, 5, 1);
19938 _ssSetOutputPortConnected(childS, 0, 1);
19939 _ssSetOutputPortBeingMerged(childS, 0, 0);
19940
19941 /* Update the BufferDstPort flags for each input port */
19942 _ssSetInputPortBufferDstPort(childS, 0, -1);
19943 _ssSetInputPortBufferDstPort(childS, 1, -1);
19944 _ssSetInputPortBufferDstPort(childS, 2, -1);
19945 _ssSetInputPortBufferDstPort(childS, 3, -1);
19946 _ssSetInputPortBufferDstPort(childS, 4, -1);
19947 _ssSetInputPortBufferDstPort(childS, 5, -1);
19948
19949 /* Instance data for generated S-Function: LagFilter */
19950 {
19951 SimStruct *rts = childS;
19952
19953#include "LagFilter_sfcn_rtw/LagFilter_sid.h"
19954
19955 }
19956 }
19957
19958 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S69>/Generated S-Function4 (LagFilter_sf) */
19959 {
19960 SimStruct *childS = ssGetSFunction(rts, 112);
19961
19962 /* timing info */
19963 static time_T sfcnPeriod[1];
19964 static time_T sfcnOffset[1];
19965 static int_T sfcnTsMap[1];
19966 (void) memset((void*)sfcnPeriod, 0,
19967 sizeof(time_T)*1);
19968 (void) memset((void*)sfcnOffset, 0,
19969 sizeof(time_T)*1);
19970 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
19971 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
19972 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
19973
19974 /* Set up the mdlInfo pointer */
19975# ifdef USE_RTMODEL
19976
19977 {
19978 static struct _ssBlkInfo2 _blkInfo2;
19979 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
19980 ssSetBlkInfo2Ptr(childS, blkInfo2);
19981 }
19982
19983 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
19984
19985# else
19986
19987 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
19988
19989# endif /* USE_RTMODEL */
19990
19991 /* Allocate memory of model methods 2 */
19992 {
19993 static struct _ssSFcnModelMethods2 methods2;
19994 ssSetModelMethods2(childS, &methods2);
19995 }
19996
19997 /* Allocate memory of model methods 3 */
19998 {
19999 static struct _ssSFcnModelMethods3 methods3;
20000 ssSetModelMethods3(childS, &methods3);
20001 }
20002
20003 /* Allocate memory for states auxilliary information */
20004 {
20005 static struct _ssStatesInfo2 statesInfo2;
20006 static ssPeriodicStatesInfo periodicStatesInfo;
20007 ssSetStatesInfo2(childS, &statesInfo2);
20008 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
20009 }
20010
20011 /* inputs */
20012 {
20013 static struct _ssPortInputs inputPortInfo[6];
20014 _ssSetNumInputPorts(childS, 6);
20015 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
20016
20017 /* port 0 */
20018 {
20019 static real32_T const *sfcnUPtrs[1];
20020 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
20021 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReuseS;
20022 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
20023 _ssSetInputPortNumDimensions(childS, 0, 1);
20024 ssSetInputPortWidth(childS, 0, 1);
20025 }
20026
20027 /* port 1 */
20028 {
20029 static int8_T const *sfcnUPtrs[1];
20030 sfcnUPtrs[0] = (int8_T const *) &((B_AFCS_MODEL1_T *)
20031 ssGetLocalBlockIO(rts))->DataTypeConversion_p;
20032 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
20033 _ssSetInputPortNumDimensions(childS, 1, 1);
20034 ssSetInputPortWidth(childS, 1, 1);
20035 }
20036
20037 /* port 2 */
20038 {
20039 static real32_T const *sfcnUPtrs[1];
20040 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled107;
20041 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
20042 _ssSetInputPortNumDimensions(childS, 2, 1);
20043 ssSetInputPortWidth(childS, 2, 1);
20044 }
20045
20046 /* port 3 */
20047 {
20048 static real32_T const *sfcnUPtrs[1];
20049 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
20050 ssGetLocalBlockIO(rts))->Switch_fz;
20051 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
20052 _ssSetInputPortNumDimensions(childS, 3, 1);
20053 ssSetInputPortWidth(childS, 3, 1);
20054 }
20055
20056 /* port 4 */
20057 {
20058 static real32_T const *sfcnUPtrs[1];
20059 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
20060 ssGetLocalBlockIO(rts))->Switch_fz;
20061 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
20062 _ssSetInputPortNumDimensions(childS, 4, 1);
20063 ssSetInputPortWidth(childS, 4, 1);
20064 }
20065
20066 /* port 5 */
20067 {
20068 static real32_T const *sfcnUPtrs[1];
20069 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled106;
20070 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
20071 _ssSetInputPortNumDimensions(childS, 5, 1);
20072 ssSetInputPortWidth(childS, 5, 1);
20073 }
20074 }
20075
20076 /* outputs */
20077 {
20078 static struct _ssPortOutputs outputPortInfo[1];
20079 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
20080 _ssSetNumOutputPorts(childS, 1);
20081
20082 /* port 0 */
20083 {
20084 _ssSetOutputPortNumDimensions(childS, 0, 1);
20085 ssSetOutputPortWidth(childS, 0, 1);
20086 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
20087 *) ssGetLocalBlockIO(rts))->GeneratedSFunction4_pd));
20088 }
20089 }
20090
20091 /* path info */
20092 _ssSetModelName(childS, "LagFilter_sf");
20093 _ssSetPath(childS,
20094 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/NWScontrol/ lag filter/Generated S-Function4");
20095 if (ssGetRTModel(rts) == (NULL)) {
20096 _ssSetParentSS(childS, rts);
20097 _ssSetRootSS(childS, ssGetRootSS(rts));
20098 } else {
20099 ssSetRTModel(childS,ssGetRTModel(rts));
20100 _ssSetParentSS(childS, (NULL));
20101 _ssSetRootSS(childS, childS);
20102 }
20103
20104 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
20105
20106 /* work vectors */
20107 {
20108 static struct _ssDWorkRecord dWorkRecord[4];
20109 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
20110 ssSetSFcnDWork(childS, dWorkRecord);
20111 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
20112 _ssSetNumDWork(childS, 4);
20113
20114 /* DWORK0 */
20115 ssSetDWorkWidth(childS, 0, 1);
20116 ssSetDWorkDataType(childS, 0,SS_SINGLE);
20117 ssSetDWorkComplexSignal(childS, 0, 0);
20118 ssSetDWorkUsedAsDState(childS, 0, 1);
20119 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 232))[0]);
20120
20121 /* DWORK1 */
20122 ssSetDWorkWidth(childS, 1, 1);
20123 ssSetDWorkDataType(childS, 1,SS_SINGLE);
20124 ssSetDWorkComplexSignal(childS, 1, 0);
20125 ssSetDWorkUsedAsDState(childS, 1, 1);
20126 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 233))[0]);
20127
20128 /* DWORK2 */
20129 ssSetDWorkWidth(childS, 2, 1);
20130 ssSetDWorkDataType(childS, 2,SS_INT8);
20131 ssSetDWorkComplexSignal(childS, 2, 0);
20132 ssSetDWorkUsedAsDState(childS, 2, 1);
20133 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 459))[0]);
20134
20135 /* DWORK3 */
20136 ssSetDWorkWidth(childS, 3, 1);
20137 ssSetDWorkDataType(childS, 3,SS_INT8);
20138 ssSetDWorkComplexSignal(childS, 3, 0);
20139 ssSetDWorkUsedAsDState(childS, 3, 1);
20140 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 460))[0]);
20141 }
20142
20143 /* registration */
20144 LagFilter_sf(childS);
20145 sfcnInitializeSizes(childS);
20146 sfcnInitializeSampleTimes(childS);
20147
20148 /* adjust sample time */
20149 ssSetSampleTime(childS, 0, 0.0);
20150 ssSetOffsetTime(childS, 0, 0.0);
20151 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
20152
20153 /* set compiled values of dynamic vector attributes */
20154 ssSetNumNonsampledZCs(childS, 0);
20155
20156 /* Update connectivity flags for each port */
20157 _ssSetInputPortConnected(childS, 0, 1);
20158 _ssSetInputPortConnected(childS, 1, 1);
20159 _ssSetInputPortConnected(childS, 2, 1);
20160 _ssSetInputPortConnected(childS, 3, 1);
20161 _ssSetInputPortConnected(childS, 4, 1);
20162 _ssSetInputPortConnected(childS, 5, 1);
20163 _ssSetOutputPortConnected(childS, 0, 1);
20164 _ssSetOutputPortBeingMerged(childS, 0, 0);
20165
20166 /* Update the BufferDstPort flags for each input port */
20167 _ssSetInputPortBufferDstPort(childS, 0, -1);
20168 _ssSetInputPortBufferDstPort(childS, 1, -1);
20169 _ssSetInputPortBufferDstPort(childS, 2, -1);
20170 _ssSetInputPortBufferDstPort(childS, 3, -1);
20171 _ssSetInputPortBufferDstPort(childS, 4, -1);
20172 _ssSetInputPortBufferDstPort(childS, 5, -1);
20173
20174 /* Instance data for generated S-Function: LagFilter */
20175 {
20176 SimStruct *rts = childS;
20177
20178#include "LagFilter_sfcn_rtw/LagFilter_sid.h"
20179
20180 }
20181 }
20182
20183 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S70>/Generated S-Function4 (LagFilter_sf) */
20184 {
20185 SimStruct *childS = ssGetSFunction(rts, 113);
20186
20187 /* timing info */
20188 static time_T sfcnPeriod[1];
20189 static time_T sfcnOffset[1];
20190 static int_T sfcnTsMap[1];
20191 (void) memset((void*)sfcnPeriod, 0,
20192 sizeof(time_T)*1);
20193 (void) memset((void*)sfcnOffset, 0,
20194 sizeof(time_T)*1);
20195 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
20196 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
20197 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
20198
20199 /* Set up the mdlInfo pointer */
20200# ifdef USE_RTMODEL
20201
20202 {
20203 static struct _ssBlkInfo2 _blkInfo2;
20204 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
20205 ssSetBlkInfo2Ptr(childS, blkInfo2);
20206 }
20207
20208 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
20209
20210# else
20211
20212 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
20213
20214# endif /* USE_RTMODEL */
20215
20216 /* Allocate memory of model methods 2 */
20217 {
20218 static struct _ssSFcnModelMethods2 methods2;
20219 ssSetModelMethods2(childS, &methods2);
20220 }
20221
20222 /* Allocate memory of model methods 3 */
20223 {
20224 static struct _ssSFcnModelMethods3 methods3;
20225 ssSetModelMethods3(childS, &methods3);
20226 }
20227
20228 /* Allocate memory for states auxilliary information */
20229 {
20230 static struct _ssStatesInfo2 statesInfo2;
20231 static ssPeriodicStatesInfo periodicStatesInfo;
20232 ssSetStatesInfo2(childS, &statesInfo2);
20233 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
20234 }
20235
20236 /* inputs */
20237 {
20238 static struct _ssPortInputs inputPortInfo[6];
20239 _ssSetNumInputPorts(childS, 6);
20240 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
20241
20242 /* port 0 */
20243 {
20244 static real32_T const *sfcnUPtrs[1];
20245 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
20246 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReuseS;
20247 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
20248 _ssSetInputPortNumDimensions(childS, 0, 1);
20249 ssSetInputPortWidth(childS, 0, 1);
20250 }
20251
20252 /* port 1 */
20253 {
20254 static int8_T const *sfcnUPtrs[1];
20255 sfcnUPtrs[0] = (int8_T const *) &((B_AFCS_MODEL1_T *)
20256 ssGetLocalBlockIO(rts))->DataTypeConversion2_b;
20257 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
20258 _ssSetInputPortNumDimensions(childS, 1, 1);
20259 ssSetInputPortWidth(childS, 1, 1);
20260 }
20261
20262 /* port 2 */
20263 {
20264 static real32_T const *sfcnUPtrs[1];
20265 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled107;
20266 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
20267 _ssSetInputPortNumDimensions(childS, 2, 1);
20268 ssSetInputPortWidth(childS, 2, 1);
20269 }
20270
20271 /* port 3 */
20272 {
20273 static real32_T const *sfcnUPtrs[1];
20274 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
20275 ssGetLocalBlockIO(rts))->Switch_fz;
20276 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
20277 _ssSetInputPortNumDimensions(childS, 3, 1);
20278 ssSetInputPortWidth(childS, 3, 1);
20279 }
20280
20281 /* port 4 */
20282 {
20283 static real32_T const *sfcnUPtrs[1];
20284 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
20285 ssGetLocalBlockIO(rts))->Switch_fz;
20286 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
20287 _ssSetInputPortNumDimensions(childS, 4, 1);
20288 ssSetInputPortWidth(childS, 4, 1);
20289 }
20290
20291 /* port 5 */
20292 {
20293 static real32_T const *sfcnUPtrs[1];
20294 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
20295 ssGetLocalBlockIO(rts))->Gain_k;
20296 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
20297 _ssSetInputPortNumDimensions(childS, 5, 1);
20298 ssSetInputPortWidth(childS, 5, 1);
20299 }
20300 }
20301
20302 /* outputs */
20303 {
20304 static struct _ssPortOutputs outputPortInfo[1];
20305 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
20306 _ssSetNumOutputPorts(childS, 1);
20307
20308 /* port 0 */
20309 {
20310 _ssSetOutputPortNumDimensions(childS, 0, 1);
20311 ssSetOutputPortWidth(childS, 0, 1);
20312 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
20313 *) ssGetLocalBlockIO(rts))->GeneratedSFunction4_h));
20314 }
20315 }
20316
20317 /* path info */
20318 _ssSetModelName(childS, "LagFilter_sf");
20319 _ssSetPath(childS,
20320 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/NWScontrol/ lag filter1/Generated S-Function4");
20321 if (ssGetRTModel(rts) == (NULL)) {
20322 _ssSetParentSS(childS, rts);
20323 _ssSetRootSS(childS, ssGetRootSS(rts));
20324 } else {
20325 ssSetRTModel(childS,ssGetRTModel(rts));
20326 _ssSetParentSS(childS, (NULL));
20327 _ssSetRootSS(childS, childS);
20328 }
20329
20330 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
20331
20332 /* work vectors */
20333 {
20334 static struct _ssDWorkRecord dWorkRecord[4];
20335 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
20336 ssSetSFcnDWork(childS, dWorkRecord);
20337 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
20338 _ssSetNumDWork(childS, 4);
20339
20340 /* DWORK0 */
20341 ssSetDWorkWidth(childS, 0, 1);
20342 ssSetDWorkDataType(childS, 0,SS_SINGLE);
20343 ssSetDWorkComplexSignal(childS, 0, 0);
20344 ssSetDWorkUsedAsDState(childS, 0, 1);
20345 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 234))[0]);
20346
20347 /* DWORK1 */
20348 ssSetDWorkWidth(childS, 1, 1);
20349 ssSetDWorkDataType(childS, 1,SS_SINGLE);
20350 ssSetDWorkComplexSignal(childS, 1, 0);
20351 ssSetDWorkUsedAsDState(childS, 1, 1);
20352 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 235))[0]);
20353
20354 /* DWORK2 */
20355 ssSetDWorkWidth(childS, 2, 1);
20356 ssSetDWorkDataType(childS, 2,SS_INT8);
20357 ssSetDWorkComplexSignal(childS, 2, 0);
20358 ssSetDWorkUsedAsDState(childS, 2, 1);
20359 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 461))[0]);
20360
20361 /* DWORK3 */
20362 ssSetDWorkWidth(childS, 3, 1);
20363 ssSetDWorkDataType(childS, 3,SS_INT8);
20364 ssSetDWorkComplexSignal(childS, 3, 0);
20365 ssSetDWorkUsedAsDState(childS, 3, 1);
20366 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 462))[0]);
20367 }
20368
20369 /* registration */
20370 LagFilter_sf(childS);
20371 sfcnInitializeSizes(childS);
20372 sfcnInitializeSampleTimes(childS);
20373
20374 /* adjust sample time */
20375 ssSetSampleTime(childS, 0, 0.0);
20376 ssSetOffsetTime(childS, 0, 0.0);
20377 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
20378
20379 /* set compiled values of dynamic vector attributes */
20380 ssSetNumNonsampledZCs(childS, 0);
20381
20382 /* Update connectivity flags for each port */
20383 _ssSetInputPortConnected(childS, 0, 1);
20384 _ssSetInputPortConnected(childS, 1, 1);
20385 _ssSetInputPortConnected(childS, 2, 1);
20386 _ssSetInputPortConnected(childS, 3, 1);
20387 _ssSetInputPortConnected(childS, 4, 1);
20388 _ssSetInputPortConnected(childS, 5, 1);
20389 _ssSetOutputPortConnected(childS, 0, 1);
20390 _ssSetOutputPortBeingMerged(childS, 0, 0);
20391
20392 /* Update the BufferDstPort flags for each input port */
20393 _ssSetInputPortBufferDstPort(childS, 0, -1);
20394 _ssSetInputPortBufferDstPort(childS, 1, -1);
20395 _ssSetInputPortBufferDstPort(childS, 2, -1);
20396 _ssSetInputPortBufferDstPort(childS, 3, -1);
20397 _ssSetInputPortBufferDstPort(childS, 4, -1);
20398 _ssSetInputPortBufferDstPort(childS, 5, -1);
20399
20400 /* Instance data for generated S-Function: LagFilter */
20401 {
20402 SimStruct *rts = childS;
20403
20404#include "LagFilter_sfcn_rtw/LagFilter_sid.h"
20405
20406 }
20407 }
20408
20409 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S77>/Generated S-Function1 (SaturationLimiter_sf) */
20410 {
20411 SimStruct *childS = ssGetSFunction(rts, 114);
20412
20413 /* timing info */
20414 static time_T sfcnPeriod[1];
20415 static time_T sfcnOffset[1];
20416 static int_T sfcnTsMap[1];
20417 (void) memset((void*)sfcnPeriod, 0,
20418 sizeof(time_T)*1);
20419 (void) memset((void*)sfcnOffset, 0,
20420 sizeof(time_T)*1);
20421 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
20422 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
20423 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
20424
20425 /* Set up the mdlInfo pointer */
20426# ifdef USE_RTMODEL
20427
20428 {
20429 static struct _ssBlkInfo2 _blkInfo2;
20430 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
20431 ssSetBlkInfo2Ptr(childS, blkInfo2);
20432 }
20433
20434 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
20435
20436# else
20437
20438 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
20439
20440# endif /* USE_RTMODEL */
20441
20442 /* Allocate memory of model methods 2 */
20443 {
20444 static struct _ssSFcnModelMethods2 methods2;
20445 ssSetModelMethods2(childS, &methods2);
20446 }
20447
20448 /* Allocate memory of model methods 3 */
20449 {
20450 static struct _ssSFcnModelMethods3 methods3;
20451 ssSetModelMethods3(childS, &methods3);
20452 }
20453
20454 /* Allocate memory for states auxilliary information */
20455 {
20456 static struct _ssStatesInfo2 statesInfo2;
20457 static ssPeriodicStatesInfo periodicStatesInfo;
20458 ssSetStatesInfo2(childS, &statesInfo2);
20459 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
20460 }
20461
20462 /* inputs */
20463 {
20464 static struct _ssPortInputs inputPortInfo[3];
20465 _ssSetNumInputPorts(childS, 3);
20466 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
20467
20468 /* port 0 */
20469 {
20470 static real32_T const *sfcnUPtrs[1];
20471 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
20472 ssGetLocalBlockIO(rts))->Sum2_b;
20473 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
20474 _ssSetInputPortNumDimensions(childS, 0, 1);
20475 ssSetInputPortWidth(childS, 0, 1);
20476 }
20477
20478 /* port 1 */
20479 {
20480 static real32_T const *sfcnUPtrs[1];
20481 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled107;
20482 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
20483 _ssSetInputPortNumDimensions(childS, 1, 1);
20484 ssSetInputPortWidth(childS, 1, 1);
20485 }
20486
20487 /* port 2 */
20488 {
20489 static real32_T const *sfcnUPtrs[1];
20490 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled119;
20491 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
20492 _ssSetInputPortNumDimensions(childS, 2, 1);
20493 ssSetInputPortWidth(childS, 2, 1);
20494 }
20495 }
20496
20497 /* outputs */
20498 {
20499 static struct _ssPortOutputs outputPortInfo[1];
20500 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
20501 _ssSetNumOutputPorts(childS, 1);
20502
20503 /* port 0 */
20504 {
20505 _ssSetOutputPortNumDimensions(childS, 0, 1);
20506 ssSetOutputPortWidth(childS, 0, 1);
20507 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
20508 *) ssGetLocalBlockIO(rts))->GeneratedSFunction1_i));
20509 }
20510 }
20511
20512 /* path info */
20513 _ssSetModelName(childS, "SaturationLimiter_sf");
20514 _ssSetPath(childS,
20515 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/NWScontrol/RwyLControl/Saturation Limiter3/Generated S-Function1");
20516 if (ssGetRTModel(rts) == (NULL)) {
20517 _ssSetParentSS(childS, rts);
20518 _ssSetRootSS(childS, ssGetRootSS(rts));
20519 } else {
20520 ssSetRTModel(childS,ssGetRTModel(rts));
20521 _ssSetParentSS(childS, (NULL));
20522 _ssSetRootSS(childS, childS);
20523 }
20524
20525 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
20526
20527 /* registration */
20528 SaturationLimiter_sf(childS);
20529 sfcnInitializeSizes(childS);
20530 sfcnInitializeSampleTimes(childS);
20531
20532 /* adjust sample time */
20533 ssSetSampleTime(childS, 0, 0.0);
20534 ssSetOffsetTime(childS, 0, 0.0);
20535 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
20536
20537 /* set compiled values of dynamic vector attributes */
20538 ssSetNumNonsampledZCs(childS, 0);
20539
20540 /* Update connectivity flags for each port */
20541 _ssSetInputPortConnected(childS, 0, 1);
20542 _ssSetInputPortConnected(childS, 1, 1);
20543 _ssSetInputPortConnected(childS, 2, 1);
20544 _ssSetOutputPortConnected(childS, 0, 1);
20545 _ssSetOutputPortBeingMerged(childS, 0, 0);
20546
20547 /* Update the BufferDstPort flags for each input port */
20548 _ssSetInputPortBufferDstPort(childS, 0, -1);
20549 _ssSetInputPortBufferDstPort(childS, 1, -1);
20550 _ssSetInputPortBufferDstPort(childS, 2, -1);
20551
20552 /* Instance data for generated S-Function: SaturationLimiter */
20553 {
20554 SimStruct *rts = childS;
20555
20556#include "SaturationLimiter_sfcn_rtw/SaturationLimiter_sid.h"
20557
20558 }
20559 }
20560
20561 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S79>/Generated S-Function (Gain_sf) */
20562 {
20563 SimStruct *childS = ssGetSFunction(rts, 115);
20564
20565 /* timing info */
20566 static time_T sfcnPeriod[1];
20567 static time_T sfcnOffset[1];
20568 static int_T sfcnTsMap[1];
20569 (void) memset((void*)sfcnPeriod, 0,
20570 sizeof(time_T)*1);
20571 (void) memset((void*)sfcnOffset, 0,
20572 sizeof(time_T)*1);
20573 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
20574 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
20575 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
20576
20577 /* Set up the mdlInfo pointer */
20578# ifdef USE_RTMODEL
20579
20580 {
20581 static struct _ssBlkInfo2 _blkInfo2;
20582 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
20583 ssSetBlkInfo2Ptr(childS, blkInfo2);
20584 }
20585
20586 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
20587
20588# else
20589
20590 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
20591
20592# endif /* USE_RTMODEL */
20593
20594 /* Allocate memory of model methods 2 */
20595 {
20596 static struct _ssSFcnModelMethods2 methods2;
20597 ssSetModelMethods2(childS, &methods2);
20598 }
20599
20600 /* Allocate memory of model methods 3 */
20601 {
20602 static struct _ssSFcnModelMethods3 methods3;
20603 ssSetModelMethods3(childS, &methods3);
20604 }
20605
20606 /* Allocate memory for states auxilliary information */
20607 {
20608 static struct _ssStatesInfo2 statesInfo2;
20609 static ssPeriodicStatesInfo periodicStatesInfo;
20610 ssSetStatesInfo2(childS, &statesInfo2);
20611 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
20612 }
20613
20614 /* inputs */
20615 {
20616 static struct _ssPortInputs inputPortInfo[2];
20617 _ssSetNumInputPorts(childS, 2);
20618 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
20619
20620 /* port 0 */
20621 {
20622 static real32_T const *sfcnUPtrs[1];
20623 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
20624 ssGetLocalBlockIO(rts))->GeneratedSFunction1_i;
20625 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
20626 _ssSetInputPortNumDimensions(childS, 0, 1);
20627 ssSetInputPortWidth(childS, 0, 1);
20628 }
20629
20630 /* port 1 */
20631 {
20632 static real32_T const *sfcnUPtrs[1];
20633 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled109;
20634 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
20635 _ssSetInputPortNumDimensions(childS, 1, 1);
20636 ssSetInputPortWidth(childS, 1, 1);
20637 }
20638 }
20639
20640 /* outputs */
20641 {
20642 static struct _ssPortOutputs outputPortInfo[1];
20643 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
20644 _ssSetNumOutputPorts(childS, 1);
20645
20646 /* port 0 */
20647 {
20648 _ssSetOutputPortNumDimensions(childS, 0, 1);
20649 ssSetOutputPortWidth(childS, 0, 1);
20650 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
20651 *) ssGetLocalBlockIO(rts))->Saturation2_p));
20652 }
20653 }
20654
20655 /* path info */
20656 _ssSetModelName(childS, "Gain_sf");
20657 _ssSetPath(childS,
20658 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/NWScontrol/RwyLControl/gain3/Generated S-Function");
20659 if (ssGetRTModel(rts) == (NULL)) {
20660 _ssSetParentSS(childS, rts);
20661 _ssSetRootSS(childS, ssGetRootSS(rts));
20662 } else {
20663 ssSetRTModel(childS,ssGetRTModel(rts));
20664 _ssSetParentSS(childS, (NULL));
20665 _ssSetRootSS(childS, childS);
20666 }
20667
20668 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
20669
20670 /* registration */
20671 Gain_sf(childS);
20672 sfcnInitializeSizes(childS);
20673 sfcnInitializeSampleTimes(childS);
20674
20675 /* adjust sample time */
20676 ssSetSampleTime(childS, 0, 0.0);
20677 ssSetOffsetTime(childS, 0, 0.0);
20678 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
20679
20680 /* set compiled values of dynamic vector attributes */
20681 ssSetNumNonsampledZCs(childS, 0);
20682
20683 /* Update connectivity flags for each port */
20684 _ssSetInputPortConnected(childS, 0, 1);
20685 _ssSetInputPortConnected(childS, 1, 1);
20686 _ssSetOutputPortConnected(childS, 0, 1);
20687 _ssSetOutputPortBeingMerged(childS, 0, 0);
20688
20689 /* Update the BufferDstPort flags for each input port */
20690 _ssSetInputPortBufferDstPort(childS, 0, -1);
20691 _ssSetInputPortBufferDstPort(childS, 1, -1);
20692
20693 /* Instance data for generated S-Function: Gain */
20694 {
20695 SimStruct *rts = childS;
20696
20697#include "Gain_sfcn_rtw/Gain_sid.h"
20698
20699 }
20700 }
20701
20702 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S72>/Generated S-Function6 (Res180_sf) */
20703 {
20704 SimStruct *childS = ssGetSFunction(rts, 116);
20705
20706 /* timing info */
20707 static time_T sfcnPeriod[1];
20708 static time_T sfcnOffset[1];
20709 static int_T sfcnTsMap[1];
20710 (void) memset((void*)sfcnPeriod, 0,
20711 sizeof(time_T)*1);
20712 (void) memset((void*)sfcnOffset, 0,
20713 sizeof(time_T)*1);
20714 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
20715 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
20716 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
20717
20718 /* Set up the mdlInfo pointer */
20719# ifdef USE_RTMODEL
20720
20721 {
20722 static struct _ssBlkInfo2 _blkInfo2;
20723 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
20724 ssSetBlkInfo2Ptr(childS, blkInfo2);
20725 }
20726
20727 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
20728
20729# else
20730
20731 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
20732
20733# endif /* USE_RTMODEL */
20734
20735 /* Allocate memory of model methods 2 */
20736 {
20737 static struct _ssSFcnModelMethods2 methods2;
20738 ssSetModelMethods2(childS, &methods2);
20739 }
20740
20741 /* Allocate memory of model methods 3 */
20742 {
20743 static struct _ssSFcnModelMethods3 methods3;
20744 ssSetModelMethods3(childS, &methods3);
20745 }
20746
20747 /* Allocate memory for states auxilliary information */
20748 {
20749 static struct _ssStatesInfo2 statesInfo2;
20750 static ssPeriodicStatesInfo periodicStatesInfo;
20751 ssSetStatesInfo2(childS, &statesInfo2);
20752 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
20753 }
20754
20755 /* inputs */
20756 {
20757 static struct _ssPortInputs inputPortInfo[1];
20758 _ssSetNumInputPorts(childS, 1);
20759 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
20760
20761 /* port 0 */
20762 {
20763 static real32_T const *sfcnUPtrs[1];
20764 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
20765 ssGetLocalBlockIO(rts))->Sum3_ca;
20766 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
20767 _ssSetInputPortNumDimensions(childS, 0, 1);
20768 ssSetInputPortWidth(childS, 0, 1);
20769 }
20770 }
20771
20772 /* outputs */
20773 {
20774 static struct _ssPortOutputs outputPortInfo[1];
20775 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
20776 _ssSetNumOutputPorts(childS, 1);
20777
20778 /* port 0 */
20779 {
20780 _ssSetOutputPortNumDimensions(childS, 0, 1);
20781 ssSetOutputPortWidth(childS, 0, 1);
20782 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
20783 *) ssGetLocalBlockIO(rts))->GeneratedSFunction6_j));
20784 }
20785 }
20786
20787 /* path info */
20788 _ssSetModelName(childS, "Res180_sf");
20789 _ssSetPath(childS,
20790 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/NWScontrol/RwyLControl/Generated S-Function6");
20791 if (ssGetRTModel(rts) == (NULL)) {
20792 _ssSetParentSS(childS, rts);
20793 _ssSetRootSS(childS, ssGetRootSS(rts));
20794 } else {
20795 ssSetRTModel(childS,ssGetRTModel(rts));
20796 _ssSetParentSS(childS, (NULL));
20797 _ssSetRootSS(childS, childS);
20798 }
20799
20800 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
20801
20802 /* registration */
20803 Res180_sf(childS);
20804 sfcnInitializeSizes(childS);
20805 sfcnInitializeSampleTimes(childS);
20806
20807 /* adjust sample time */
20808 ssSetSampleTime(childS, 0, 0.0);
20809 ssSetOffsetTime(childS, 0, 0.0);
20810 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
20811
20812 /* set compiled values of dynamic vector attributes */
20813 ssSetNumNonsampledZCs(childS, 0);
20814
20815 /* Update connectivity flags for each port */
20816 _ssSetInputPortConnected(childS, 0, 1);
20817 _ssSetOutputPortConnected(childS, 0, 1);
20818 _ssSetOutputPortBeingMerged(childS, 0, 0);
20819
20820 /* Update the BufferDstPort flags for each input port */
20821 _ssSetInputPortBufferDstPort(childS, 0, -1);
20822
20823 /* Instance data for generated S-Function: Res180 */
20824 {
20825 SimStruct *rts = childS;
20826
20827#include "Res180_sfcn_rtw/Res180_sid.h"
20828
20829 }
20830 }
20831
20832 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S76>/Generated S-Function1 (SaturationLimiter_sf) */
20833 {
20834 SimStruct *childS = ssGetSFunction(rts, 117);
20835
20836 /* timing info */
20837 static time_T sfcnPeriod[1];
20838 static time_T sfcnOffset[1];
20839 static int_T sfcnTsMap[1];
20840 (void) memset((void*)sfcnPeriod, 0,
20841 sizeof(time_T)*1);
20842 (void) memset((void*)sfcnOffset, 0,
20843 sizeof(time_T)*1);
20844 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
20845 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
20846 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
20847
20848 /* Set up the mdlInfo pointer */
20849# ifdef USE_RTMODEL
20850
20851 {
20852 static struct _ssBlkInfo2 _blkInfo2;
20853 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
20854 ssSetBlkInfo2Ptr(childS, blkInfo2);
20855 }
20856
20857 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
20858
20859# else
20860
20861 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
20862
20863# endif /* USE_RTMODEL */
20864
20865 /* Allocate memory of model methods 2 */
20866 {
20867 static struct _ssSFcnModelMethods2 methods2;
20868 ssSetModelMethods2(childS, &methods2);
20869 }
20870
20871 /* Allocate memory of model methods 3 */
20872 {
20873 static struct _ssSFcnModelMethods3 methods3;
20874 ssSetModelMethods3(childS, &methods3);
20875 }
20876
20877 /* Allocate memory for states auxilliary information */
20878 {
20879 static struct _ssStatesInfo2 statesInfo2;
20880 static ssPeriodicStatesInfo periodicStatesInfo;
20881 ssSetStatesInfo2(childS, &statesInfo2);
20882 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
20883 }
20884
20885 /* inputs */
20886 {
20887 static struct _ssPortInputs inputPortInfo[3];
20888 _ssSetNumInputPorts(childS, 3);
20889 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
20890
20891 /* port 0 */
20892 {
20893 static real32_T const *sfcnUPtrs[1];
20894 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
20895 ssGetLocalBlockIO(rts))->GeneratedSFunction6_j;
20896 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
20897 _ssSetInputPortNumDimensions(childS, 0, 1);
20898 ssSetInputPortWidth(childS, 0, 1);
20899 }
20900
20901 /* port 1 */
20902 {
20903 static real32_T const *sfcnUPtrs[1];
20904 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled120;
20905 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
20906 _ssSetInputPortNumDimensions(childS, 1, 1);
20907 ssSetInputPortWidth(childS, 1, 1);
20908 }
20909
20910 /* port 2 */
20911 {
20912 static real32_T const *sfcnUPtrs[1];
20913 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled121;
20914 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
20915 _ssSetInputPortNumDimensions(childS, 2, 1);
20916 ssSetInputPortWidth(childS, 2, 1);
20917 }
20918 }
20919
20920 /* outputs */
20921 {
20922 static struct _ssPortOutputs outputPortInfo[1];
20923 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
20924 _ssSetNumOutputPorts(childS, 1);
20925
20926 /* port 0 */
20927 {
20928 _ssSetOutputPortNumDimensions(childS, 0, 1);
20929 ssSetOutputPortWidth(childS, 0, 1);
20930 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
20931 *) ssGetLocalBlockIO(rts))->GeneratedSFunction1_k));
20932 }
20933 }
20934
20935 /* path info */
20936 _ssSetModelName(childS, "SaturationLimiter_sf");
20937 _ssSetPath(childS,
20938 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/NWScontrol/RwyLControl/Saturation Limiter1/Generated S-Function1");
20939 if (ssGetRTModel(rts) == (NULL)) {
20940 _ssSetParentSS(childS, rts);
20941 _ssSetRootSS(childS, ssGetRootSS(rts));
20942 } else {
20943 ssSetRTModel(childS,ssGetRTModel(rts));
20944 _ssSetParentSS(childS, (NULL));
20945 _ssSetRootSS(childS, childS);
20946 }
20947
20948 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
20949
20950 /* registration */
20951 SaturationLimiter_sf(childS);
20952 sfcnInitializeSizes(childS);
20953 sfcnInitializeSampleTimes(childS);
20954
20955 /* adjust sample time */
20956 ssSetSampleTime(childS, 0, 0.0);
20957 ssSetOffsetTime(childS, 0, 0.0);
20958 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
20959
20960 /* set compiled values of dynamic vector attributes */
20961 ssSetNumNonsampledZCs(childS, 0);
20962
20963 /* Update connectivity flags for each port */
20964 _ssSetInputPortConnected(childS, 0, 1);
20965 _ssSetInputPortConnected(childS, 1, 1);
20966 _ssSetInputPortConnected(childS, 2, 1);
20967 _ssSetOutputPortConnected(childS, 0, 1);
20968 _ssSetOutputPortBeingMerged(childS, 0, 0);
20969
20970 /* Update the BufferDstPort flags for each input port */
20971 _ssSetInputPortBufferDstPort(childS, 0, -1);
20972 _ssSetInputPortBufferDstPort(childS, 1, -1);
20973 _ssSetInputPortBufferDstPort(childS, 2, -1);
20974
20975 /* Instance data for generated S-Function: SaturationLimiter */
20976 {
20977 SimStruct *rts = childS;
20978
20979#include "SaturationLimiter_sfcn_rtw/SaturationLimiter_sid.h"
20980
20981 }
20982 }
20983
20984 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S78>/Generated S-Function (Gain_sf) */
20985 {
20986 SimStruct *childS = ssGetSFunction(rts, 118);
20987
20988 /* timing info */
20989 static time_T sfcnPeriod[1];
20990 static time_T sfcnOffset[1];
20991 static int_T sfcnTsMap[1];
20992 (void) memset((void*)sfcnPeriod, 0,
20993 sizeof(time_T)*1);
20994 (void) memset((void*)sfcnOffset, 0,
20995 sizeof(time_T)*1);
20996 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
20997 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
20998 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
20999
21000 /* Set up the mdlInfo pointer */
21001# ifdef USE_RTMODEL
21002
21003 {
21004 static struct _ssBlkInfo2 _blkInfo2;
21005 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
21006 ssSetBlkInfo2Ptr(childS, blkInfo2);
21007 }
21008
21009 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
21010
21011# else
21012
21013 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
21014
21015# endif /* USE_RTMODEL */
21016
21017 /* Allocate memory of model methods 2 */
21018 {
21019 static struct _ssSFcnModelMethods2 methods2;
21020 ssSetModelMethods2(childS, &methods2);
21021 }
21022
21023 /* Allocate memory of model methods 3 */
21024 {
21025 static struct _ssSFcnModelMethods3 methods3;
21026 ssSetModelMethods3(childS, &methods3);
21027 }
21028
21029 /* Allocate memory for states auxilliary information */
21030 {
21031 static struct _ssStatesInfo2 statesInfo2;
21032 static ssPeriodicStatesInfo periodicStatesInfo;
21033 ssSetStatesInfo2(childS, &statesInfo2);
21034 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
21035 }
21036
21037 /* inputs */
21038 {
21039 static struct _ssPortInputs inputPortInfo[2];
21040 _ssSetNumInputPorts(childS, 2);
21041 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
21042
21043 /* port 0 */
21044 {
21045 static real32_T const *sfcnUPtrs[1];
21046 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
21047 ssGetLocalBlockIO(rts))->GeneratedSFunction1_k;
21048 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
21049 _ssSetInputPortNumDimensions(childS, 0, 1);
21050 ssSetInputPortWidth(childS, 0, 1);
21051 }
21052
21053 /* port 1 */
21054 {
21055 static real32_T const *sfcnUPtrs[1];
21056 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled109;
21057 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
21058 _ssSetInputPortNumDimensions(childS, 1, 1);
21059 ssSetInputPortWidth(childS, 1, 1);
21060 }
21061 }
21062
21063 /* outputs */
21064 {
21065 static struct _ssPortOutputs outputPortInfo[1];
21066 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
21067 _ssSetNumOutputPorts(childS, 1);
21068
21069 /* port 0 */
21070 {
21071 _ssSetOutputPortNumDimensions(childS, 0, 1);
21072 ssSetOutputPortWidth(childS, 0, 1);
21073 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
21074 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_cq));
21075 }
21076 }
21077
21078 /* path info */
21079 _ssSetModelName(childS, "Gain_sf");
21080 _ssSetPath(childS,
21081 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/NWScontrol/RwyLControl/gain2/Generated S-Function");
21082 if (ssGetRTModel(rts) == (NULL)) {
21083 _ssSetParentSS(childS, rts);
21084 _ssSetRootSS(childS, ssGetRootSS(rts));
21085 } else {
21086 ssSetRTModel(childS,ssGetRTModel(rts));
21087 _ssSetParentSS(childS, (NULL));
21088 _ssSetRootSS(childS, childS);
21089 }
21090
21091 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
21092
21093 /* registration */
21094 Gain_sf(childS);
21095 sfcnInitializeSizes(childS);
21096 sfcnInitializeSampleTimes(childS);
21097
21098 /* adjust sample time */
21099 ssSetSampleTime(childS, 0, 0.0);
21100 ssSetOffsetTime(childS, 0, 0.0);
21101 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
21102
21103 /* set compiled values of dynamic vector attributes */
21104 ssSetNumNonsampledZCs(childS, 0);
21105
21106 /* Update connectivity flags for each port */
21107 _ssSetInputPortConnected(childS, 0, 1);
21108 _ssSetInputPortConnected(childS, 1, 1);
21109 _ssSetOutputPortConnected(childS, 0, 1);
21110 _ssSetOutputPortBeingMerged(childS, 0, 0);
21111
21112 /* Update the BufferDstPort flags for each input port */
21113 _ssSetInputPortBufferDstPort(childS, 0, -1);
21114 _ssSetInputPortBufferDstPort(childS, 1, -1);
21115
21116 /* Instance data for generated S-Function: Gain */
21117 {
21118 SimStruct *rts = childS;
21119
21120#include "Gain_sfcn_rtw/Gain_sid.h"
21121
21122 }
21123 }
21124
21125 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S75>/Generated S-Function2 (LeadLagFilter_sf) */
21126 {
21127 SimStruct *childS = ssGetSFunction(rts, 119);
21128
21129 /* timing info */
21130 static time_T sfcnPeriod[1];
21131 static time_T sfcnOffset[1];
21132 static int_T sfcnTsMap[1];
21133 (void) memset((void*)sfcnPeriod, 0,
21134 sizeof(time_T)*1);
21135 (void) memset((void*)sfcnOffset, 0,
21136 sizeof(time_T)*1);
21137 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
21138 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
21139 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
21140
21141 /* Set up the mdlInfo pointer */
21142# ifdef USE_RTMODEL
21143
21144 {
21145 static struct _ssBlkInfo2 _blkInfo2;
21146 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
21147 ssSetBlkInfo2Ptr(childS, blkInfo2);
21148 }
21149
21150 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
21151
21152# else
21153
21154 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
21155
21156# endif /* USE_RTMODEL */
21157
21158 /* Allocate memory of model methods 2 */
21159 {
21160 static struct _ssSFcnModelMethods2 methods2;
21161 ssSetModelMethods2(childS, &methods2);
21162 }
21163
21164 /* Allocate memory of model methods 3 */
21165 {
21166 static struct _ssSFcnModelMethods3 methods3;
21167 ssSetModelMethods3(childS, &methods3);
21168 }
21169
21170 /* Allocate memory for states auxilliary information */
21171 {
21172 static struct _ssStatesInfo2 statesInfo2;
21173 static ssPeriodicStatesInfo periodicStatesInfo;
21174 ssSetStatesInfo2(childS, &statesInfo2);
21175 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
21176 }
21177
21178 /* inputs */
21179 {
21180 static struct _ssPortInputs inputPortInfo[7];
21181 _ssSetNumInputPorts(childS, 7);
21182 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
21183
21184 /* port 0 */
21185 {
21186 static real32_T const *sfcnUPtrs[1];
21187 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
21188 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReuseS;
21189 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
21190 _ssSetInputPortNumDimensions(childS, 0, 1);
21191 ssSetInputPortWidth(childS, 0, 1);
21192 }
21193
21194 /* port 1 */
21195 {
21196 static int8_T const *sfcnUPtrs[1];
21197 sfcnUPtrs[0] = (int8_T const *) &((B_AFCS_MODEL1_T *)
21198 ssGetLocalBlockIO(rts))->DataTypeConversion1_jy;
21199 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
21200 _ssSetInputPortNumDimensions(childS, 1, 1);
21201 ssSetInputPortWidth(childS, 1, 1);
21202 }
21203
21204 /* port 2 */
21205 {
21206 static real32_T const *sfcnUPtrs[1];
21207 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled114;
21208 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
21209 _ssSetInputPortNumDimensions(childS, 2, 1);
21210 ssSetInputPortWidth(childS, 2, 1);
21211 }
21212
21213 /* port 3 */
21214 {
21215 static real32_T const *sfcnUPtrs[1];
21216 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled108;
21217 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
21218 _ssSetInputPortNumDimensions(childS, 3, 1);
21219 ssSetInputPortWidth(childS, 3, 1);
21220 }
21221
21222 /* port 4 */
21223 {
21224 static real32_T const *sfcnUPtrs[1];
21225 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
21226 ssGetLocalBlockIO(rts))->Switch_fz;
21227 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
21228 _ssSetInputPortNumDimensions(childS, 4, 1);
21229 ssSetInputPortWidth(childS, 4, 1);
21230 }
21231
21232 /* port 5 */
21233 {
21234 static real32_T const *sfcnUPtrs[1];
21235 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
21236 ssGetLocalBlockIO(rts))->Switch_fz;
21237 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
21238 _ssSetInputPortNumDimensions(childS, 5, 1);
21239 ssSetInputPortWidth(childS, 5, 1);
21240 }
21241
21242 /* port 6 */
21243 {
21244 static real32_T const *sfcnUPtrs[1];
21245 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
21246 ssGetLocalBlockIO(rts))->GeneratedSFunction_cq;
21247 _ssSetInputPortSignalPtrs(childS, 6, (InputPtrsType)&sfcnUPtrs[0]);
21248 _ssSetInputPortNumDimensions(childS, 6, 1);
21249 ssSetInputPortWidth(childS, 6, 1);
21250 }
21251 }
21252
21253 /* outputs */
21254 {
21255 static struct _ssPortOutputs outputPortInfo[1];
21256 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
21257 _ssSetNumOutputPorts(childS, 1);
21258
21259 /* port 0 */
21260 {
21261 _ssSetOutputPortNumDimensions(childS, 0, 1);
21262 ssSetOutputPortWidth(childS, 0, 1);
21263 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
21264 *) ssGetLocalBlockIO(rts))->GeneratedSFunction2_m5));
21265 }
21266 }
21267
21268 /* path info */
21269 _ssSetModelName(childS, "LeadLagFilter_sf");
21270 _ssSetPath(childS,
21271 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/NWScontrol/RwyLControl/Lead lag1/Generated S-Function2");
21272 if (ssGetRTModel(rts) == (NULL)) {
21273 _ssSetParentSS(childS, rts);
21274 _ssSetRootSS(childS, ssGetRootSS(rts));
21275 } else {
21276 ssSetRTModel(childS,ssGetRTModel(rts));
21277 _ssSetParentSS(childS, (NULL));
21278 _ssSetRootSS(childS, childS);
21279 }
21280
21281 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
21282
21283 /* work vectors */
21284 {
21285 static struct _ssDWorkRecord dWorkRecord[4];
21286 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
21287 ssSetSFcnDWork(childS, dWorkRecord);
21288 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
21289 _ssSetNumDWork(childS, 4);
21290
21291 /* DWORK0 */
21292 ssSetDWorkWidth(childS, 0, 1);
21293 ssSetDWorkDataType(childS, 0,SS_SINGLE);
21294 ssSetDWorkComplexSignal(childS, 0, 0);
21295 ssSetDWorkUsedAsDState(childS, 0, 1);
21296 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 236))[0]);
21297
21298 /* DWORK1 */
21299 ssSetDWorkWidth(childS, 1, 1);
21300 ssSetDWorkDataType(childS, 1,SS_SINGLE);
21301 ssSetDWorkComplexSignal(childS, 1, 0);
21302 ssSetDWorkUsedAsDState(childS, 1, 1);
21303 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 237))[0]);
21304
21305 /* DWORK2 */
21306 ssSetDWorkWidth(childS, 2, 1);
21307 ssSetDWorkDataType(childS, 2,SS_INT8);
21308 ssSetDWorkComplexSignal(childS, 2, 0);
21309 ssSetDWorkUsedAsDState(childS, 2, 1);
21310 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 463))[0]);
21311
21312 /* DWORK3 */
21313 ssSetDWorkWidth(childS, 3, 1);
21314 ssSetDWorkDataType(childS, 3,SS_INT8);
21315 ssSetDWorkComplexSignal(childS, 3, 0);
21316 ssSetDWorkUsedAsDState(childS, 3, 1);
21317 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 464))[0]);
21318 }
21319
21320 /* registration */
21321 LeadLagFilter_sf(childS);
21322 sfcnInitializeSizes(childS);
21323 sfcnInitializeSampleTimes(childS);
21324
21325 /* adjust sample time */
21326 ssSetSampleTime(childS, 0, 0.0);
21327 ssSetOffsetTime(childS, 0, 0.0);
21328 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
21329
21330 /* set compiled values of dynamic vector attributes */
21331 ssSetNumNonsampledZCs(childS, 0);
21332
21333 /* Update connectivity flags for each port */
21334 _ssSetInputPortConnected(childS, 0, 1);
21335 _ssSetInputPortConnected(childS, 1, 1);
21336 _ssSetInputPortConnected(childS, 2, 1);
21337 _ssSetInputPortConnected(childS, 3, 1);
21338 _ssSetInputPortConnected(childS, 4, 1);
21339 _ssSetInputPortConnected(childS, 5, 1);
21340 _ssSetInputPortConnected(childS, 6, 1);
21341 _ssSetOutputPortConnected(childS, 0, 1);
21342 _ssSetOutputPortBeingMerged(childS, 0, 0);
21343
21344 /* Update the BufferDstPort flags for each input port */
21345 _ssSetInputPortBufferDstPort(childS, 0, -1);
21346 _ssSetInputPortBufferDstPort(childS, 1, -1);
21347 _ssSetInputPortBufferDstPort(childS, 2, -1);
21348 _ssSetInputPortBufferDstPort(childS, 3, -1);
21349 _ssSetInputPortBufferDstPort(childS, 4, -1);
21350 _ssSetInputPortBufferDstPort(childS, 5, -1);
21351 _ssSetInputPortBufferDstPort(childS, 6, -1);
21352
21353 /* Instance data for generated S-Function: LeadLagFilter */
21354 {
21355 SimStruct *rts = childS;
21356
21357#include "LeadLagFilter_sfcn_rtw/LeadLagFilter_sid.h"
21358
21359 }
21360 }
21361
21362 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S74>/Generated S-Function4 (LagFilter_sf) */
21363 {
21364 SimStruct *childS = ssGetSFunction(rts, 120);
21365
21366 /* timing info */
21367 static time_T sfcnPeriod[1];
21368 static time_T sfcnOffset[1];
21369 static int_T sfcnTsMap[1];
21370 (void) memset((void*)sfcnPeriod, 0,
21371 sizeof(time_T)*1);
21372 (void) memset((void*)sfcnOffset, 0,
21373 sizeof(time_T)*1);
21374 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
21375 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
21376 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
21377
21378 /* Set up the mdlInfo pointer */
21379# ifdef USE_RTMODEL
21380
21381 {
21382 static struct _ssBlkInfo2 _blkInfo2;
21383 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
21384 ssSetBlkInfo2Ptr(childS, blkInfo2);
21385 }
21386
21387 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
21388
21389# else
21390
21391 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
21392
21393# endif /* USE_RTMODEL */
21394
21395 /* Allocate memory of model methods 2 */
21396 {
21397 static struct _ssSFcnModelMethods2 methods2;
21398 ssSetModelMethods2(childS, &methods2);
21399 }
21400
21401 /* Allocate memory of model methods 3 */
21402 {
21403 static struct _ssSFcnModelMethods3 methods3;
21404 ssSetModelMethods3(childS, &methods3);
21405 }
21406
21407 /* Allocate memory for states auxilliary information */
21408 {
21409 static struct _ssStatesInfo2 statesInfo2;
21410 static ssPeriodicStatesInfo periodicStatesInfo;
21411 ssSetStatesInfo2(childS, &statesInfo2);
21412 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
21413 }
21414
21415 /* inputs */
21416 {
21417 static struct _ssPortInputs inputPortInfo[6];
21418 _ssSetNumInputPorts(childS, 6);
21419 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
21420
21421 /* port 0 */
21422 {
21423 static real32_T const *sfcnUPtrs[1];
21424 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
21425 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReuseS;
21426 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
21427 _ssSetInputPortNumDimensions(childS, 0, 1);
21428 ssSetInputPortWidth(childS, 0, 1);
21429 }
21430
21431 /* port 1 */
21432 {
21433 static int8_T const *sfcnUPtrs[1];
21434 sfcnUPtrs[0] = (int8_T const *) &((B_AFCS_MODEL1_T *)
21435 ssGetLocalBlockIO(rts))->DataTypeConversion1_jy;
21436 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
21437 _ssSetInputPortNumDimensions(childS, 1, 1);
21438 ssSetInputPortWidth(childS, 1, 1);
21439 }
21440
21441 /* port 2 */
21442 {
21443 static real32_T const *sfcnUPtrs[1];
21444 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled107;
21445 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
21446 _ssSetInputPortNumDimensions(childS, 2, 1);
21447 ssSetInputPortWidth(childS, 2, 1);
21448 }
21449
21450 /* port 3 */
21451 {
21452 static real32_T const *sfcnUPtrs[1];
21453 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
21454 ssGetLocalBlockIO(rts))->Switch_fz;
21455 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
21456 _ssSetInputPortNumDimensions(childS, 3, 1);
21457 ssSetInputPortWidth(childS, 3, 1);
21458 }
21459
21460 /* port 4 */
21461 {
21462 static real32_T const *sfcnUPtrs[1];
21463 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
21464 ssGetLocalBlockIO(rts))->Switch_fz;
21465 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
21466 _ssSetInputPortNumDimensions(childS, 4, 1);
21467 ssSetInputPortWidth(childS, 4, 1);
21468 }
21469
21470 /* port 5 */
21471 {
21472 static real32_T const *sfcnUPtrs[1];
21473 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
21474 ssGetLocalBlockIO(rts))->GeneratedSFunction2_m5;
21475 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
21476 _ssSetInputPortNumDimensions(childS, 5, 1);
21477 ssSetInputPortWidth(childS, 5, 1);
21478 }
21479 }
21480
21481 /* outputs */
21482 {
21483 static struct _ssPortOutputs outputPortInfo[1];
21484 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
21485 _ssSetNumOutputPorts(childS, 1);
21486
21487 /* port 0 */
21488 {
21489 _ssSetOutputPortNumDimensions(childS, 0, 1);
21490 ssSetOutputPortWidth(childS, 0, 1);
21491 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
21492 *) ssGetLocalBlockIO(rts))->GeneratedSFunction4_cw));
21493 }
21494 }
21495
21496 /* path info */
21497 _ssSetModelName(childS, "LagFilter_sf");
21498 _ssSetPath(childS,
21499 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/Autopilot/NWScontrol/RwyLControl/ lag filter/Generated S-Function4");
21500 if (ssGetRTModel(rts) == (NULL)) {
21501 _ssSetParentSS(childS, rts);
21502 _ssSetRootSS(childS, ssGetRootSS(rts));
21503 } else {
21504 ssSetRTModel(childS,ssGetRTModel(rts));
21505 _ssSetParentSS(childS, (NULL));
21506 _ssSetRootSS(childS, childS);
21507 }
21508
21509 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
21510
21511 /* work vectors */
21512 {
21513 static struct _ssDWorkRecord dWorkRecord[4];
21514 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
21515 ssSetSFcnDWork(childS, dWorkRecord);
21516 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
21517 _ssSetNumDWork(childS, 4);
21518
21519 /* DWORK0 */
21520 ssSetDWorkWidth(childS, 0, 1);
21521 ssSetDWorkDataType(childS, 0,SS_SINGLE);
21522 ssSetDWorkComplexSignal(childS, 0, 0);
21523 ssSetDWorkUsedAsDState(childS, 0, 1);
21524 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 238))[0]);
21525
21526 /* DWORK1 */
21527 ssSetDWorkWidth(childS, 1, 1);
21528 ssSetDWorkDataType(childS, 1,SS_SINGLE);
21529 ssSetDWorkComplexSignal(childS, 1, 0);
21530 ssSetDWorkUsedAsDState(childS, 1, 1);
21531 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 239))[0]);
21532
21533 /* DWORK2 */
21534 ssSetDWorkWidth(childS, 2, 1);
21535 ssSetDWorkDataType(childS, 2,SS_INT8);
21536 ssSetDWorkComplexSignal(childS, 2, 0);
21537 ssSetDWorkUsedAsDState(childS, 2, 1);
21538 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 465))[0]);
21539
21540 /* DWORK3 */
21541 ssSetDWorkWidth(childS, 3, 1);
21542 ssSetDWorkDataType(childS, 3,SS_INT8);
21543 ssSetDWorkComplexSignal(childS, 3, 0);
21544 ssSetDWorkUsedAsDState(childS, 3, 1);
21545 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 466))[0]);
21546 }
21547
21548 /* registration */
21549 LagFilter_sf(childS);
21550 sfcnInitializeSizes(childS);
21551 sfcnInitializeSampleTimes(childS);
21552
21553 /* adjust sample time */
21554 ssSetSampleTime(childS, 0, 0.0);
21555 ssSetOffsetTime(childS, 0, 0.0);
21556 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
21557
21558 /* set compiled values of dynamic vector attributes */
21559 ssSetNumNonsampledZCs(childS, 0);
21560
21561 /* Update connectivity flags for each port */
21562 _ssSetInputPortConnected(childS, 0, 1);
21563 _ssSetInputPortConnected(childS, 1, 1);
21564 _ssSetInputPortConnected(childS, 2, 1);
21565 _ssSetInputPortConnected(childS, 3, 1);
21566 _ssSetInputPortConnected(childS, 4, 1);
21567 _ssSetInputPortConnected(childS, 5, 1);
21568 _ssSetOutputPortConnected(childS, 0, 1);
21569 _ssSetOutputPortBeingMerged(childS, 0, 0);
21570
21571 /* Update the BufferDstPort flags for each input port */
21572 _ssSetInputPortBufferDstPort(childS, 0, -1);
21573 _ssSetInputPortBufferDstPort(childS, 1, -1);
21574 _ssSetInputPortBufferDstPort(childS, 2, -1);
21575 _ssSetInputPortBufferDstPort(childS, 3, -1);
21576 _ssSetInputPortBufferDstPort(childS, 4, -1);
21577 _ssSetInputPortBufferDstPort(childS, 5, -1);
21578
21579 /* Instance data for generated S-Function: LagFilter */
21580 {
21581 SimStruct *rts = childS;
21582
21583#include "LagFilter_sfcn_rtw/LagFilter_sid.h"
21584
21585 }
21586 }
21587
21588 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S209>/Generated S-Function1 (SaturationLimiter_sf) */
21589 {
21590 SimStruct *childS = ssGetSFunction(rts, 121);
21591
21592 /* timing info */
21593 static time_T sfcnPeriod[1];
21594 static time_T sfcnOffset[1];
21595 static int_T sfcnTsMap[1];
21596 (void) memset((void*)sfcnPeriod, 0,
21597 sizeof(time_T)*1);
21598 (void) memset((void*)sfcnOffset, 0,
21599 sizeof(time_T)*1);
21600 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
21601 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
21602 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
21603
21604 /* Set up the mdlInfo pointer */
21605# ifdef USE_RTMODEL
21606
21607 {
21608 static struct _ssBlkInfo2 _blkInfo2;
21609 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
21610 ssSetBlkInfo2Ptr(childS, blkInfo2);
21611 }
21612
21613 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
21614
21615# else
21616
21617 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
21618
21619# endif /* USE_RTMODEL */
21620
21621 /* Allocate memory of model methods 2 */
21622 {
21623 static struct _ssSFcnModelMethods2 methods2;
21624 ssSetModelMethods2(childS, &methods2);
21625 }
21626
21627 /* Allocate memory of model methods 3 */
21628 {
21629 static struct _ssSFcnModelMethods3 methods3;
21630 ssSetModelMethods3(childS, &methods3);
21631 }
21632
21633 /* Allocate memory for states auxilliary information */
21634 {
21635 static struct _ssStatesInfo2 statesInfo2;
21636 static ssPeriodicStatesInfo periodicStatesInfo;
21637 ssSetStatesInfo2(childS, &statesInfo2);
21638 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
21639 }
21640
21641 /* inputs */
21642 {
21643 static struct _ssPortInputs inputPortInfo[3];
21644 _ssSetNumInputPorts(childS, 3);
21645 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
21646
21647 /* port 0 */
21648 {
21649 static real32_T const *sfcnUPtrs[1];
21650 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
21651 ssGetLocalBlockIO(rts))->Switch_lr;
21652 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
21653 _ssSetInputPortNumDimensions(childS, 0, 1);
21654 ssSetInputPortWidth(childS, 0, 1);
21655 }
21656
21657 /* port 1 */
21658 {
21659 static real32_T const *sfcnUPtrs[1];
21660 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled105;
21661 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
21662 _ssSetInputPortNumDimensions(childS, 1, 1);
21663 ssSetInputPortWidth(childS, 1, 1);
21664 }
21665
21666 /* port 2 */
21667 {
21668 static real32_T const *sfcnUPtrs[1];
21669 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled106;
21670 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
21671 _ssSetInputPortNumDimensions(childS, 2, 1);
21672 ssSetInputPortWidth(childS, 2, 1);
21673 }
21674 }
21675
21676 /* outputs */
21677 {
21678 static struct _ssPortOutputs outputPortInfo[1];
21679 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
21680 _ssSetNumOutputPorts(childS, 1);
21681
21682 /* port 0 */
21683 {
21684 _ssSetOutputPortNumDimensions(childS, 0, 1);
21685 ssSetOutputPortWidth(childS, 0, 1);
21686 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
21687 *) ssGetLocalBlockIO(rts))->GeneratedSFunction1_oi));
21688 }
21689 }
21690
21691 /* path info */
21692 _ssSetModelName(childS, "SaturationLimiter_sf");
21693 _ssSetPath(childS,
21694 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/CAS/Saturation Limiter/Generated S-Function1");
21695 if (ssGetRTModel(rts) == (NULL)) {
21696 _ssSetParentSS(childS, rts);
21697 _ssSetRootSS(childS, ssGetRootSS(rts));
21698 } else {
21699 ssSetRTModel(childS,ssGetRTModel(rts));
21700 _ssSetParentSS(childS, (NULL));
21701 _ssSetRootSS(childS, childS);
21702 }
21703
21704 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
21705
21706 /* registration */
21707 SaturationLimiter_sf(childS);
21708 sfcnInitializeSizes(childS);
21709 sfcnInitializeSampleTimes(childS);
21710
21711 /* adjust sample time */
21712 ssSetSampleTime(childS, 0, 0.0);
21713 ssSetOffsetTime(childS, 0, 0.0);
21714 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
21715
21716 /* set compiled values of dynamic vector attributes */
21717 ssSetNumNonsampledZCs(childS, 0);
21718
21719 /* Update connectivity flags for each port */
21720 _ssSetInputPortConnected(childS, 0, 1);
21721 _ssSetInputPortConnected(childS, 1, 1);
21722 _ssSetInputPortConnected(childS, 2, 1);
21723 _ssSetOutputPortConnected(childS, 0, 1);
21724 _ssSetOutputPortBeingMerged(childS, 0, 0);
21725
21726 /* Update the BufferDstPort flags for each input port */
21727 _ssSetInputPortBufferDstPort(childS, 0, -1);
21728 _ssSetInputPortBufferDstPort(childS, 1, -1);
21729 _ssSetInputPortBufferDstPort(childS, 2, -1);
21730
21731 /* Instance data for generated S-Function: SaturationLimiter */
21732 {
21733 SimStruct *rts = childS;
21734
21735#include "SaturationLimiter_sfcn_rtw/SaturationLimiter_sid.h"
21736
21737 }
21738 }
21739
21740 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S208>/Generated S-Function (RateLimiter_sf) */
21741 {
21742 SimStruct *childS = ssGetSFunction(rts, 122);
21743
21744 /* timing info */
21745 static time_T sfcnPeriod[1];
21746 static time_T sfcnOffset[1];
21747 static int_T sfcnTsMap[1];
21748 (void) memset((void*)sfcnPeriod, 0,
21749 sizeof(time_T)*1);
21750 (void) memset((void*)sfcnOffset, 0,
21751 sizeof(time_T)*1);
21752 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
21753 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
21754 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
21755
21756 /* Set up the mdlInfo pointer */
21757# ifdef USE_RTMODEL
21758
21759 {
21760 static struct _ssBlkInfo2 _blkInfo2;
21761 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
21762 ssSetBlkInfo2Ptr(childS, blkInfo2);
21763 }
21764
21765 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
21766
21767# else
21768
21769 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
21770
21771# endif /* USE_RTMODEL */
21772
21773 /* Allocate memory of model methods 2 */
21774 {
21775 static struct _ssSFcnModelMethods2 methods2;
21776 ssSetModelMethods2(childS, &methods2);
21777 }
21778
21779 /* Allocate memory of model methods 3 */
21780 {
21781 static struct _ssSFcnModelMethods3 methods3;
21782 ssSetModelMethods3(childS, &methods3);
21783 }
21784
21785 /* Allocate memory for states auxilliary information */
21786 {
21787 static struct _ssStatesInfo2 statesInfo2;
21788 static ssPeriodicStatesInfo periodicStatesInfo;
21789 ssSetStatesInfo2(childS, &statesInfo2);
21790 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
21791 }
21792
21793 /* inputs */
21794 {
21795 static struct _ssPortInputs inputPortInfo[5];
21796 _ssSetNumInputPorts(childS, 5);
21797 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
21798
21799 /* port 0 */
21800 {
21801 static int8_T const *sfcnUPtrs[1];
21802 sfcnUPtrs[0] = (int8_T const *) &AFCS_MODEL1_ConstP.pooled143;
21803 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
21804 _ssSetInputPortNumDimensions(childS, 0, 1);
21805 ssSetInputPortWidth(childS, 0, 1);
21806 }
21807
21808 /* port 1 */
21809 {
21810 static real32_T const *sfcnUPtrs[1];
21811 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
21812 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReus_b[5];
21813 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
21814 _ssSetInputPortNumDimensions(childS, 1, 1);
21815 ssSetInputPortWidth(childS, 1, 1);
21816 }
21817
21818 /* port 2 */
21819 {
21820 static real32_T const *sfcnUPtrs[1];
21821 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled123;
21822 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
21823 _ssSetInputPortNumDimensions(childS, 2, 1);
21824 ssSetInputPortWidth(childS, 2, 1);
21825 }
21826
21827 /* port 3 */
21828 {
21829 static real32_T const *sfcnUPtrs[1];
21830 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
21831 ssGetLocalBlockIO(rts))->dtCAS;
21832 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
21833 _ssSetInputPortNumDimensions(childS, 3, 1);
21834 ssSetInputPortWidth(childS, 3, 1);
21835 }
21836
21837 /* port 4 */
21838 {
21839 static real32_T const *sfcnUPtrs[1];
21840 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
21841 ssGetLocalBlockIO(rts))->GeneratedSFunction1_oi;
21842 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
21843 _ssSetInputPortNumDimensions(childS, 4, 1);
21844 ssSetInputPortWidth(childS, 4, 1);
21845 }
21846 }
21847
21848 /* outputs */
21849 {
21850 static struct _ssPortOutputs outputPortInfo[2];
21851 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
21852 _ssSetNumOutputPorts(childS, 2);
21853
21854 /* port 0 */
21855 {
21856 _ssSetOutputPortNumDimensions(childS, 0, 1);
21857 ssSetOutputPortWidth(childS, 0, 1);
21858 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
21859 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_o1));
21860 }
21861
21862 /* port 1 */
21863 {
21864 _ssSetOutputPortNumDimensions(childS, 1, 1);
21865 ssSetOutputPortWidth(childS, 1, 1);
21866 _ssSetOutputPortSignal(childS, 1, ((real32_T *) &((B_AFCS_MODEL1_T
21867 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_o2));
21868 }
21869 }
21870
21871 /* path info */
21872 _ssSetModelName(childS, "RateLimiter_sf");
21873 _ssSetPath(childS,
21874 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/CAS/Rate Limiter/Generated S-Function");
21875 if (ssGetRTModel(rts) == (NULL)) {
21876 _ssSetParentSS(childS, rts);
21877 _ssSetRootSS(childS, ssGetRootSS(rts));
21878 } else {
21879 ssSetRTModel(childS,ssGetRTModel(rts));
21880 _ssSetParentSS(childS, (NULL));
21881 _ssSetRootSS(childS, childS);
21882 }
21883
21884 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
21885
21886 /* work vectors */
21887 {
21888 static struct _ssDWorkRecord dWorkRecord[3];
21889 static struct _ssDWorkAuxRecord dWorkAuxRecord[3];
21890 ssSetSFcnDWork(childS, dWorkRecord);
21891 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
21892 _ssSetNumDWork(childS, 3);
21893
21894 /* DWORK0 */
21895 ssSetDWorkWidth(childS, 0, 1);
21896 ssSetDWorkDataType(childS, 0,SS_SINGLE);
21897 ssSetDWorkComplexSignal(childS, 0, 0);
21898 ssSetDWorkUsedAsDState(childS, 0, 1);
21899 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 240))[0]);
21900
21901 /* DWORK1 */
21902 ssSetDWorkWidth(childS, 1, 1);
21903 ssSetDWorkDataType(childS, 1,SS_INT8);
21904 ssSetDWorkComplexSignal(childS, 1, 0);
21905 ssSetDWorkUsedAsDState(childS, 1, 1);
21906 _ssSetDWork(childS, 1, &((int8_T*) ssGetDWork(rts, 467))[0]);
21907
21908 /* DWORK2 */
21909 ssSetDWorkWidth(childS, 2, 1);
21910 ssSetDWorkDataType(childS, 2,SS_INT8);
21911 ssSetDWorkComplexSignal(childS, 2, 0);
21912 ssSetDWorkUsedAsDState(childS, 2, 1);
21913 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 468))[0]);
21914 }
21915
21916 /* registration */
21917 RateLimiter_sf(childS);
21918 sfcnInitializeSizes(childS);
21919 sfcnInitializeSampleTimes(childS);
21920
21921 /* adjust sample time */
21922 ssSetSampleTime(childS, 0, 0.0);
21923 ssSetOffsetTime(childS, 0, 0.0);
21924 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
21925
21926 /* set compiled values of dynamic vector attributes */
21927 ssSetNumNonsampledZCs(childS, 0);
21928
21929 /* Update connectivity flags for each port */
21930 _ssSetInputPortConnected(childS, 0, 1);
21931 _ssSetInputPortConnected(childS, 1, 1);
21932 _ssSetInputPortConnected(childS, 2, 1);
21933 _ssSetInputPortConnected(childS, 3, 1);
21934 _ssSetInputPortConnected(childS, 4, 1);
21935 _ssSetOutputPortConnected(childS, 0, 1);
21936 _ssSetOutputPortConnected(childS, 1, 1);
21937 _ssSetOutputPortBeingMerged(childS, 0, 0);
21938 _ssSetOutputPortBeingMerged(childS, 1, 0);
21939
21940 /* Update the BufferDstPort flags for each input port */
21941 _ssSetInputPortBufferDstPort(childS, 0, -1);
21942 _ssSetInputPortBufferDstPort(childS, 1, -1);
21943 _ssSetInputPortBufferDstPort(childS, 2, -1);
21944 _ssSetInputPortBufferDstPort(childS, 3, -1);
21945 _ssSetInputPortBufferDstPort(childS, 4, -1);
21946
21947 /* Instance data for generated S-Function: RateLimiter */
21948 {
21949 SimStruct *rts = childS;
21950
21951#include "RateLimiter_sfcn_rtw/RateLimiter_sid.h"
21952
21953 }
21954 }
21955
21956 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S241>/Generated S-Function4 (LagFilter_sf) */
21957 {
21958 SimStruct *childS = ssGetSFunction(rts, 123);
21959
21960 /* timing info */
21961 static time_T sfcnPeriod[1];
21962 static time_T sfcnOffset[1];
21963 static int_T sfcnTsMap[1];
21964 (void) memset((void*)sfcnPeriod, 0,
21965 sizeof(time_T)*1);
21966 (void) memset((void*)sfcnOffset, 0,
21967 sizeof(time_T)*1);
21968 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
21969 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
21970 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
21971
21972 /* Set up the mdlInfo pointer */
21973# ifdef USE_RTMODEL
21974
21975 {
21976 static struct _ssBlkInfo2 _blkInfo2;
21977 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
21978 ssSetBlkInfo2Ptr(childS, blkInfo2);
21979 }
21980
21981 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
21982
21983# else
21984
21985 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
21986
21987# endif /* USE_RTMODEL */
21988
21989 /* Allocate memory of model methods 2 */
21990 {
21991 static struct _ssSFcnModelMethods2 methods2;
21992 ssSetModelMethods2(childS, &methods2);
21993 }
21994
21995 /* Allocate memory of model methods 3 */
21996 {
21997 static struct _ssSFcnModelMethods3 methods3;
21998 ssSetModelMethods3(childS, &methods3);
21999 }
22000
22001 /* Allocate memory for states auxilliary information */
22002 {
22003 static struct _ssStatesInfo2 statesInfo2;
22004 static ssPeriodicStatesInfo periodicStatesInfo;
22005 ssSetStatesInfo2(childS, &statesInfo2);
22006 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
22007 }
22008
22009 /* inputs */
22010 {
22011 static struct _ssPortInputs inputPortInfo[6];
22012 _ssSetNumInputPorts(childS, 6);
22013 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
22014
22015 /* port 0 */
22016 {
22017 static real32_T const *sfcnUPtrs[1];
22018 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
22019 ssGetLocalBlockIO(rts))->dtCAS;
22020 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
22021 _ssSetInputPortNumDimensions(childS, 0, 1);
22022 ssSetInputPortWidth(childS, 0, 1);
22023 }
22024
22025 /* port 1 */
22026 {
22027 static int8_T const *sfcnUPtrs[1];
22028 sfcnUPtrs[0] = (int8_T const *) &AFCS_MODEL1_ConstP.pooled143;
22029 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
22030 _ssSetInputPortNumDimensions(childS, 1, 1);
22031 ssSetInputPortWidth(childS, 1, 1);
22032 }
22033
22034 /* port 2 */
22035 {
22036 static real32_T const *sfcnUPtrs[1];
22037 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled126;
22038 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
22039 _ssSetInputPortNumDimensions(childS, 2, 1);
22040 ssSetInputPortWidth(childS, 2, 1);
22041 }
22042
22043 /* port 3 */
22044 {
22045 static real32_T const *sfcnUPtrs[1];
22046 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
22047 ssGetLocalBlockIO(rts))->Saturation_ll;
22048 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
22049 _ssSetInputPortNumDimensions(childS, 3, 1);
22050 ssSetInputPortWidth(childS, 3, 1);
22051 }
22052
22053 /* port 4 */
22054 {
22055 static real32_T const *sfcnUPtrs[1];
22056 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
22057 ssGetLocalBlockIO(rts))->Saturation_ll;
22058 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
22059 _ssSetInputPortNumDimensions(childS, 4, 1);
22060 ssSetInputPortWidth(childS, 4, 1);
22061 }
22062
22063 /* port 5 */
22064 {
22065 static real32_T const *sfcnUPtrs[1];
22066 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
22067 ssGetLocalBlockIO(rts))->Saturation_ll;
22068 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
22069 _ssSetInputPortNumDimensions(childS, 5, 1);
22070 ssSetInputPortWidth(childS, 5, 1);
22071 }
22072 }
22073
22074 /* outputs */
22075 {
22076 static struct _ssPortOutputs outputPortInfo[1];
22077 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
22078 _ssSetNumOutputPorts(childS, 1);
22079
22080 /* port 0 */
22081 {
22082 _ssSetOutputPortNumDimensions(childS, 0, 1);
22083 ssSetOutputPortWidth(childS, 0, 1);
22084 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
22085 *) ssGetLocalBlockIO(rts))->Saturation8));
22086 }
22087 }
22088
22089 /* path info */
22090 _ssSetModelName(childS, "LagFilter_sf");
22091 _ssSetPath(childS,
22092 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/CAS/latTdaclda1/lat/ lag filter2/Generated S-Function4");
22093 if (ssGetRTModel(rts) == (NULL)) {
22094 _ssSetParentSS(childS, rts);
22095 _ssSetRootSS(childS, ssGetRootSS(rts));
22096 } else {
22097 ssSetRTModel(childS,ssGetRTModel(rts));
22098 _ssSetParentSS(childS, (NULL));
22099 _ssSetRootSS(childS, childS);
22100 }
22101
22102 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
22103
22104 /* work vectors */
22105 {
22106 static struct _ssDWorkRecord dWorkRecord[4];
22107 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
22108 ssSetSFcnDWork(childS, dWorkRecord);
22109 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
22110 _ssSetNumDWork(childS, 4);
22111
22112 /* DWORK0 */
22113 ssSetDWorkWidth(childS, 0, 1);
22114 ssSetDWorkDataType(childS, 0,SS_SINGLE);
22115 ssSetDWorkComplexSignal(childS, 0, 0);
22116 ssSetDWorkUsedAsDState(childS, 0, 1);
22117 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 241))[0]);
22118
22119 /* DWORK1 */
22120 ssSetDWorkWidth(childS, 1, 1);
22121 ssSetDWorkDataType(childS, 1,SS_SINGLE);
22122 ssSetDWorkComplexSignal(childS, 1, 0);
22123 ssSetDWorkUsedAsDState(childS, 1, 1);
22124 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 242))[0]);
22125
22126 /* DWORK2 */
22127 ssSetDWorkWidth(childS, 2, 1);
22128 ssSetDWorkDataType(childS, 2,SS_INT8);
22129 ssSetDWorkComplexSignal(childS, 2, 0);
22130 ssSetDWorkUsedAsDState(childS, 2, 1);
22131 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 469))[0]);
22132
22133 /* DWORK3 */
22134 ssSetDWorkWidth(childS, 3, 1);
22135 ssSetDWorkDataType(childS, 3,SS_INT8);
22136 ssSetDWorkComplexSignal(childS, 3, 0);
22137 ssSetDWorkUsedAsDState(childS, 3, 1);
22138 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 470))[0]);
22139 }
22140
22141 /* registration */
22142 LagFilter_sf(childS);
22143 sfcnInitializeSizes(childS);
22144 sfcnInitializeSampleTimes(childS);
22145
22146 /* adjust sample time */
22147 ssSetSampleTime(childS, 0, 0.0);
22148 ssSetOffsetTime(childS, 0, 0.0);
22149 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
22150
22151 /* set compiled values of dynamic vector attributes */
22152 ssSetNumNonsampledZCs(childS, 0);
22153
22154 /* Update connectivity flags for each port */
22155 _ssSetInputPortConnected(childS, 0, 1);
22156 _ssSetInputPortConnected(childS, 1, 1);
22157 _ssSetInputPortConnected(childS, 2, 1);
22158 _ssSetInputPortConnected(childS, 3, 1);
22159 _ssSetInputPortConnected(childS, 4, 1);
22160 _ssSetInputPortConnected(childS, 5, 1);
22161 _ssSetOutputPortConnected(childS, 0, 1);
22162 _ssSetOutputPortBeingMerged(childS, 0, 0);
22163
22164 /* Update the BufferDstPort flags for each input port */
22165 _ssSetInputPortBufferDstPort(childS, 0, -1);
22166 _ssSetInputPortBufferDstPort(childS, 1, -1);
22167 _ssSetInputPortBufferDstPort(childS, 2, -1);
22168 _ssSetInputPortBufferDstPort(childS, 3, -1);
22169 _ssSetInputPortBufferDstPort(childS, 4, -1);
22170 _ssSetInputPortBufferDstPort(childS, 5, -1);
22171
22172 /* Instance data for generated S-Function: LagFilter */
22173 {
22174 SimStruct *rts = childS;
22175
22176#include "LagFilter_sfcn_rtw/LagFilter_sid.h"
22177
22178 }
22179 }
22180
22181 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S245>/Generated S-Function (Gain_sf) */
22182 {
22183 SimStruct *childS = ssGetSFunction(rts, 124);
22184
22185 /* timing info */
22186 static time_T sfcnPeriod[1];
22187 static time_T sfcnOffset[1];
22188 static int_T sfcnTsMap[1];
22189 (void) memset((void*)sfcnPeriod, 0,
22190 sizeof(time_T)*1);
22191 (void) memset((void*)sfcnOffset, 0,
22192 sizeof(time_T)*1);
22193 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
22194 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
22195 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
22196
22197 /* Set up the mdlInfo pointer */
22198# ifdef USE_RTMODEL
22199
22200 {
22201 static struct _ssBlkInfo2 _blkInfo2;
22202 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
22203 ssSetBlkInfo2Ptr(childS, blkInfo2);
22204 }
22205
22206 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
22207
22208# else
22209
22210 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
22211
22212# endif /* USE_RTMODEL */
22213
22214 /* Allocate memory of model methods 2 */
22215 {
22216 static struct _ssSFcnModelMethods2 methods2;
22217 ssSetModelMethods2(childS, &methods2);
22218 }
22219
22220 /* Allocate memory of model methods 3 */
22221 {
22222 static struct _ssSFcnModelMethods3 methods3;
22223 ssSetModelMethods3(childS, &methods3);
22224 }
22225
22226 /* Allocate memory for states auxilliary information */
22227 {
22228 static struct _ssStatesInfo2 statesInfo2;
22229 static ssPeriodicStatesInfo periodicStatesInfo;
22230 ssSetStatesInfo2(childS, &statesInfo2);
22231 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
22232 }
22233
22234 /* inputs */
22235 {
22236 static struct _ssPortInputs inputPortInfo[2];
22237 _ssSetNumInputPorts(childS, 2);
22238 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
22239
22240 /* port 0 */
22241 {
22242 static real32_T const *sfcnUPtrs[1];
22243 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
22244 ssGetLocalBlockIO(rts))->Sum_ot;
22245 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
22246 _ssSetInputPortNumDimensions(childS, 0, 1);
22247 ssSetInputPortWidth(childS, 0, 1);
22248 }
22249
22250 /* port 1 */
22251 {
22252 static real32_T const *sfcnUPtrs[1];
22253 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
22254 ssGetLocalBlockIO(rts))->Product_pf;
22255 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
22256 _ssSetInputPortNumDimensions(childS, 1, 1);
22257 ssSetInputPortWidth(childS, 1, 1);
22258 }
22259 }
22260
22261 /* outputs */
22262 {
22263 static struct _ssPortOutputs outputPortInfo[1];
22264 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
22265 _ssSetNumOutputPorts(childS, 1);
22266
22267 /* port 0 */
22268 {
22269 _ssSetOutputPortNumDimensions(childS, 0, 1);
22270 ssSetOutputPortWidth(childS, 0, 1);
22271 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
22272 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_fe));
22273 }
22274 }
22275
22276 /* path info */
22277 _ssSetModelName(childS, "Gain_sf");
22278 _ssSetPath(childS,
22279 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/CAS/latTdaclda1/lat/gain3/Generated S-Function");
22280 if (ssGetRTModel(rts) == (NULL)) {
22281 _ssSetParentSS(childS, rts);
22282 _ssSetRootSS(childS, ssGetRootSS(rts));
22283 } else {
22284 ssSetRTModel(childS,ssGetRTModel(rts));
22285 _ssSetParentSS(childS, (NULL));
22286 _ssSetRootSS(childS, childS);
22287 }
22288
22289 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
22290
22291 /* registration */
22292 Gain_sf(childS);
22293 sfcnInitializeSizes(childS);
22294 sfcnInitializeSampleTimes(childS);
22295
22296 /* adjust sample time */
22297 ssSetSampleTime(childS, 0, 0.0);
22298 ssSetOffsetTime(childS, 0, 0.0);
22299 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
22300
22301 /* set compiled values of dynamic vector attributes */
22302 ssSetNumNonsampledZCs(childS, 0);
22303
22304 /* Update connectivity flags for each port */
22305 _ssSetInputPortConnected(childS, 0, 1);
22306 _ssSetInputPortConnected(childS, 1, 1);
22307 _ssSetOutputPortConnected(childS, 0, 1);
22308 _ssSetOutputPortBeingMerged(childS, 0, 0);
22309
22310 /* Update the BufferDstPort flags for each input port */
22311 _ssSetInputPortBufferDstPort(childS, 0, -1);
22312 _ssSetInputPortBufferDstPort(childS, 1, -1);
22313
22314 /* Instance data for generated S-Function: Gain */
22315 {
22316 SimStruct *rts = childS;
22317
22318#include "Gain_sfcn_rtw/Gain_sid.h"
22319
22320 }
22321 }
22322
22323 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S246>/Generated S-Function (Gain_sf) */
22324 {
22325 SimStruct *childS = ssGetSFunction(rts, 125);
22326
22327 /* timing info */
22328 static time_T sfcnPeriod[1];
22329 static time_T sfcnOffset[1];
22330 static int_T sfcnTsMap[1];
22331 (void) memset((void*)sfcnPeriod, 0,
22332 sizeof(time_T)*1);
22333 (void) memset((void*)sfcnOffset, 0,
22334 sizeof(time_T)*1);
22335 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
22336 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
22337 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
22338
22339 /* Set up the mdlInfo pointer */
22340# ifdef USE_RTMODEL
22341
22342 {
22343 static struct _ssBlkInfo2 _blkInfo2;
22344 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
22345 ssSetBlkInfo2Ptr(childS, blkInfo2);
22346 }
22347
22348 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
22349
22350# else
22351
22352 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
22353
22354# endif /* USE_RTMODEL */
22355
22356 /* Allocate memory of model methods 2 */
22357 {
22358 static struct _ssSFcnModelMethods2 methods2;
22359 ssSetModelMethods2(childS, &methods2);
22360 }
22361
22362 /* Allocate memory of model methods 3 */
22363 {
22364 static struct _ssSFcnModelMethods3 methods3;
22365 ssSetModelMethods3(childS, &methods3);
22366 }
22367
22368 /* Allocate memory for states auxilliary information */
22369 {
22370 static struct _ssStatesInfo2 statesInfo2;
22371 static ssPeriodicStatesInfo periodicStatesInfo;
22372 ssSetStatesInfo2(childS, &statesInfo2);
22373 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
22374 }
22375
22376 /* inputs */
22377 {
22378 static struct _ssPortInputs inputPortInfo[2];
22379 _ssSetNumInputPorts(childS, 2);
22380 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
22381
22382 /* port 0 */
22383 {
22384 static real32_T const *sfcnUPtrs[1];
22385 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
22386 ssGetLocalBlockIO(rts))->GeneratedSFunction_fe;
22387 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
22388 _ssSetInputPortNumDimensions(childS, 0, 1);
22389 ssSetInputPortWidth(childS, 0, 1);
22390 }
22391
22392 /* port 1 */
22393 {
22394 static real32_T const *sfcnUPtrs[1];
22395 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled116;
22396 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
22397 _ssSetInputPortNumDimensions(childS, 1, 1);
22398 ssSetInputPortWidth(childS, 1, 1);
22399 }
22400 }
22401
22402 /* outputs */
22403 {
22404 static struct _ssPortOutputs outputPortInfo[1];
22405 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
22406 _ssSetNumOutputPorts(childS, 1);
22407
22408 /* port 0 */
22409 {
22410 _ssSetOutputPortNumDimensions(childS, 0, 1);
22411 ssSetOutputPortWidth(childS, 0, 1);
22412 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
22413 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_gq));
22414 }
22415 }
22416
22417 /* path info */
22418 _ssSetModelName(childS, "Gain_sf");
22419 _ssSetPath(childS,
22420 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/CAS/latTdaclda1/lat/gain4/Generated S-Function");
22421 if (ssGetRTModel(rts) == (NULL)) {
22422 _ssSetParentSS(childS, rts);
22423 _ssSetRootSS(childS, ssGetRootSS(rts));
22424 } else {
22425 ssSetRTModel(childS,ssGetRTModel(rts));
22426 _ssSetParentSS(childS, (NULL));
22427 _ssSetRootSS(childS, childS);
22428 }
22429
22430 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
22431
22432 /* registration */
22433 Gain_sf(childS);
22434 sfcnInitializeSizes(childS);
22435 sfcnInitializeSampleTimes(childS);
22436
22437 /* adjust sample time */
22438 ssSetSampleTime(childS, 0, 0.0);
22439 ssSetOffsetTime(childS, 0, 0.0);
22440 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
22441
22442 /* set compiled values of dynamic vector attributes */
22443 ssSetNumNonsampledZCs(childS, 0);
22444
22445 /* Update connectivity flags for each port */
22446 _ssSetInputPortConnected(childS, 0, 1);
22447 _ssSetInputPortConnected(childS, 1, 1);
22448 _ssSetOutputPortConnected(childS, 0, 1);
22449 _ssSetOutputPortBeingMerged(childS, 0, 0);
22450
22451 /* Update the BufferDstPort flags for each input port */
22452 _ssSetInputPortBufferDstPort(childS, 0, -1);
22453 _ssSetInputPortBufferDstPort(childS, 1, -1);
22454
22455 /* Instance data for generated S-Function: Gain */
22456 {
22457 SimStruct *rts = childS;
22458
22459#include "Gain_sfcn_rtw/Gain_sid.h"
22460
22461 }
22462 }
22463
22464 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S239>/Generated S-Function4 (LagFilter_sf) */
22465 {
22466 SimStruct *childS = ssGetSFunction(rts, 126);
22467
22468 /* timing info */
22469 static time_T sfcnPeriod[1];
22470 static time_T sfcnOffset[1];
22471 static int_T sfcnTsMap[1];
22472 (void) memset((void*)sfcnPeriod, 0,
22473 sizeof(time_T)*1);
22474 (void) memset((void*)sfcnOffset, 0,
22475 sizeof(time_T)*1);
22476 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
22477 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
22478 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
22479
22480 /* Set up the mdlInfo pointer */
22481# ifdef USE_RTMODEL
22482
22483 {
22484 static struct _ssBlkInfo2 _blkInfo2;
22485 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
22486 ssSetBlkInfo2Ptr(childS, blkInfo2);
22487 }
22488
22489 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
22490
22491# else
22492
22493 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
22494
22495# endif /* USE_RTMODEL */
22496
22497 /* Allocate memory of model methods 2 */
22498 {
22499 static struct _ssSFcnModelMethods2 methods2;
22500 ssSetModelMethods2(childS, &methods2);
22501 }
22502
22503 /* Allocate memory of model methods 3 */
22504 {
22505 static struct _ssSFcnModelMethods3 methods3;
22506 ssSetModelMethods3(childS, &methods3);
22507 }
22508
22509 /* Allocate memory for states auxilliary information */
22510 {
22511 static struct _ssStatesInfo2 statesInfo2;
22512 static ssPeriodicStatesInfo periodicStatesInfo;
22513 ssSetStatesInfo2(childS, &statesInfo2);
22514 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
22515 }
22516
22517 /* inputs */
22518 {
22519 static struct _ssPortInputs inputPortInfo[6];
22520 _ssSetNumInputPorts(childS, 6);
22521 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
22522
22523 /* port 0 */
22524 {
22525 static real32_T const *sfcnUPtrs[1];
22526 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
22527 ssGetLocalBlockIO(rts))->dtCAS;
22528 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
22529 _ssSetInputPortNumDimensions(childS, 0, 1);
22530 ssSetInputPortWidth(childS, 0, 1);
22531 }
22532
22533 /* port 1 */
22534 {
22535 static int8_T const *sfcnUPtrs[1];
22536 sfcnUPtrs[0] = (int8_T const *) &AFCS_MODEL1_ConstP.pooled143;
22537 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
22538 _ssSetInputPortNumDimensions(childS, 1, 1);
22539 ssSetInputPortWidth(childS, 1, 1);
22540 }
22541
22542 /* port 2 */
22543 {
22544 static real32_T const *sfcnUPtrs[1];
22545 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled114;
22546 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
22547 _ssSetInputPortNumDimensions(childS, 2, 1);
22548 ssSetInputPortWidth(childS, 2, 1);
22549 }
22550
22551 /* port 3 */
22552 {
22553 static real32_T const *sfcnUPtrs[1];
22554 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
22555 ssGetLocalBlockIO(rts))->Ny;
22556 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
22557 _ssSetInputPortNumDimensions(childS, 3, 1);
22558 ssSetInputPortWidth(childS, 3, 1);
22559 }
22560
22561 /* port 4 */
22562 {
22563 static real32_T const *sfcnUPtrs[1];
22564 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
22565 ssGetLocalBlockIO(rts))->Ny;
22566 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
22567 _ssSetInputPortNumDimensions(childS, 4, 1);
22568 ssSetInputPortWidth(childS, 4, 1);
22569 }
22570
22571 /* port 5 */
22572 {
22573 static real32_T const *sfcnUPtrs[1];
22574 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
22575 ssGetLocalBlockIO(rts))->Ny;
22576 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
22577 _ssSetInputPortNumDimensions(childS, 5, 1);
22578 ssSetInputPortWidth(childS, 5, 1);
22579 }
22580 }
22581
22582 /* outputs */
22583 {
22584 static struct _ssPortOutputs outputPortInfo[1];
22585 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
22586 _ssSetNumOutputPorts(childS, 1);
22587
22588 /* port 0 */
22589 {
22590 _ssSetOutputPortNumDimensions(childS, 0, 1);
22591 ssSetOutputPortWidth(childS, 0, 1);
22592 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
22593 *) ssGetLocalBlockIO(rts))->GeneratedSFunction4_kq));
22594 }
22595 }
22596
22597 /* path info */
22598 _ssSetModelName(childS, "LagFilter_sf");
22599 _ssSetPath(childS,
22600 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/CAS/latTdaclda1/lat/ lag filter/Generated S-Function4");
22601 if (ssGetRTModel(rts) == (NULL)) {
22602 _ssSetParentSS(childS, rts);
22603 _ssSetRootSS(childS, ssGetRootSS(rts));
22604 } else {
22605 ssSetRTModel(childS,ssGetRTModel(rts));
22606 _ssSetParentSS(childS, (NULL));
22607 _ssSetRootSS(childS, childS);
22608 }
22609
22610 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
22611
22612 /* work vectors */
22613 {
22614 static struct _ssDWorkRecord dWorkRecord[4];
22615 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
22616 ssSetSFcnDWork(childS, dWorkRecord);
22617 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
22618 _ssSetNumDWork(childS, 4);
22619
22620 /* DWORK0 */
22621 ssSetDWorkWidth(childS, 0, 1);
22622 ssSetDWorkDataType(childS, 0,SS_SINGLE);
22623 ssSetDWorkComplexSignal(childS, 0, 0);
22624 ssSetDWorkUsedAsDState(childS, 0, 1);
22625 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 243))[0]);
22626
22627 /* DWORK1 */
22628 ssSetDWorkWidth(childS, 1, 1);
22629 ssSetDWorkDataType(childS, 1,SS_SINGLE);
22630 ssSetDWorkComplexSignal(childS, 1, 0);
22631 ssSetDWorkUsedAsDState(childS, 1, 1);
22632 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 244))[0]);
22633
22634 /* DWORK2 */
22635 ssSetDWorkWidth(childS, 2, 1);
22636 ssSetDWorkDataType(childS, 2,SS_INT8);
22637 ssSetDWorkComplexSignal(childS, 2, 0);
22638 ssSetDWorkUsedAsDState(childS, 2, 1);
22639 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 471))[0]);
22640
22641 /* DWORK3 */
22642 ssSetDWorkWidth(childS, 3, 1);
22643 ssSetDWorkDataType(childS, 3,SS_INT8);
22644 ssSetDWorkComplexSignal(childS, 3, 0);
22645 ssSetDWorkUsedAsDState(childS, 3, 1);
22646 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 472))[0]);
22647 }
22648
22649 /* registration */
22650 LagFilter_sf(childS);
22651 sfcnInitializeSizes(childS);
22652 sfcnInitializeSampleTimes(childS);
22653
22654 /* adjust sample time */
22655 ssSetSampleTime(childS, 0, 0.0);
22656 ssSetOffsetTime(childS, 0, 0.0);
22657 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
22658
22659 /* set compiled values of dynamic vector attributes */
22660 ssSetNumNonsampledZCs(childS, 0);
22661
22662 /* Update connectivity flags for each port */
22663 _ssSetInputPortConnected(childS, 0, 1);
22664 _ssSetInputPortConnected(childS, 1, 1);
22665 _ssSetInputPortConnected(childS, 2, 1);
22666 _ssSetInputPortConnected(childS, 3, 1);
22667 _ssSetInputPortConnected(childS, 4, 1);
22668 _ssSetInputPortConnected(childS, 5, 1);
22669 _ssSetOutputPortConnected(childS, 0, 1);
22670 _ssSetOutputPortBeingMerged(childS, 0, 0);
22671
22672 /* Update the BufferDstPort flags for each input port */
22673 _ssSetInputPortBufferDstPort(childS, 0, -1);
22674 _ssSetInputPortBufferDstPort(childS, 1, -1);
22675 _ssSetInputPortBufferDstPort(childS, 2, -1);
22676 _ssSetInputPortBufferDstPort(childS, 3, -1);
22677 _ssSetInputPortBufferDstPort(childS, 4, -1);
22678 _ssSetInputPortBufferDstPort(childS, 5, -1);
22679
22680 /* Instance data for generated S-Function: LagFilter */
22681 {
22682 SimStruct *rts = childS;
22683
22684#include "LagFilter_sfcn_rtw/LagFilter_sid.h"
22685
22686 }
22687 }
22688
22689 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S242>/Generated S-Function (Gain_sf) */
22690 {
22691 SimStruct *childS = ssGetSFunction(rts, 127);
22692
22693 /* timing info */
22694 static time_T sfcnPeriod[1];
22695 static time_T sfcnOffset[1];
22696 static int_T sfcnTsMap[1];
22697 (void) memset((void*)sfcnPeriod, 0,
22698 sizeof(time_T)*1);
22699 (void) memset((void*)sfcnOffset, 0,
22700 sizeof(time_T)*1);
22701 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
22702 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
22703 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
22704
22705 /* Set up the mdlInfo pointer */
22706# ifdef USE_RTMODEL
22707
22708 {
22709 static struct _ssBlkInfo2 _blkInfo2;
22710 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
22711 ssSetBlkInfo2Ptr(childS, blkInfo2);
22712 }
22713
22714 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
22715
22716# else
22717
22718 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
22719
22720# endif /* USE_RTMODEL */
22721
22722 /* Allocate memory of model methods 2 */
22723 {
22724 static struct _ssSFcnModelMethods2 methods2;
22725 ssSetModelMethods2(childS, &methods2);
22726 }
22727
22728 /* Allocate memory of model methods 3 */
22729 {
22730 static struct _ssSFcnModelMethods3 methods3;
22731 ssSetModelMethods3(childS, &methods3);
22732 }
22733
22734 /* Allocate memory for states auxilliary information */
22735 {
22736 static struct _ssStatesInfo2 statesInfo2;
22737 static ssPeriodicStatesInfo periodicStatesInfo;
22738 ssSetStatesInfo2(childS, &statesInfo2);
22739 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
22740 }
22741
22742 /* inputs */
22743 {
22744 static struct _ssPortInputs inputPortInfo[2];
22745 _ssSetNumInputPorts(childS, 2);
22746 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
22747
22748 /* port 0 */
22749 {
22750 static real32_T const *sfcnUPtrs[1];
22751 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
22752 ssGetLocalBlockIO(rts))->GeneratedSFunction4_kq;
22753 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
22754 _ssSetInputPortNumDimensions(childS, 0, 1);
22755 ssSetInputPortWidth(childS, 0, 1);
22756 }
22757
22758 /* port 1 */
22759 {
22760 static real32_T const *sfcnUPtrs[1];
22761 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled108;
22762 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
22763 _ssSetInputPortNumDimensions(childS, 1, 1);
22764 ssSetInputPortWidth(childS, 1, 1);
22765 }
22766 }
22767
22768 /* outputs */
22769 {
22770 static struct _ssPortOutputs outputPortInfo[1];
22771 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
22772 _ssSetNumOutputPorts(childS, 1);
22773
22774 /* port 0 */
22775 {
22776 _ssSetOutputPortNumDimensions(childS, 0, 1);
22777 ssSetOutputPortWidth(childS, 0, 1);
22778 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
22779 *) ssGetLocalBlockIO(rts))->Saturation8));
22780 }
22781 }
22782
22783 /* path info */
22784 _ssSetModelName(childS, "Gain_sf");
22785 _ssSetPath(childS,
22786 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/CAS/latTdaclda1/lat/gain/Generated S-Function");
22787 if (ssGetRTModel(rts) == (NULL)) {
22788 _ssSetParentSS(childS, rts);
22789 _ssSetRootSS(childS, ssGetRootSS(rts));
22790 } else {
22791 ssSetRTModel(childS,ssGetRTModel(rts));
22792 _ssSetParentSS(childS, (NULL));
22793 _ssSetRootSS(childS, childS);
22794 }
22795
22796 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
22797
22798 /* registration */
22799 Gain_sf(childS);
22800 sfcnInitializeSizes(childS);
22801 sfcnInitializeSampleTimes(childS);
22802
22803 /* adjust sample time */
22804 ssSetSampleTime(childS, 0, 0.0);
22805 ssSetOffsetTime(childS, 0, 0.0);
22806 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
22807
22808 /* set compiled values of dynamic vector attributes */
22809 ssSetNumNonsampledZCs(childS, 0);
22810
22811 /* Update connectivity flags for each port */
22812 _ssSetInputPortConnected(childS, 0, 1);
22813 _ssSetInputPortConnected(childS, 1, 1);
22814 _ssSetOutputPortConnected(childS, 0, 1);
22815 _ssSetOutputPortBeingMerged(childS, 0, 0);
22816
22817 /* Update the BufferDstPort flags for each input port */
22818 _ssSetInputPortBufferDstPort(childS, 0, -1);
22819 _ssSetInputPortBufferDstPort(childS, 1, -1);
22820
22821 /* Instance data for generated S-Function: Gain */
22822 {
22823 SimStruct *rts = childS;
22824
22825#include "Gain_sfcn_rtw/Gain_sid.h"
22826
22827 }
22828 }
22829
22830 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S240>/Generated S-Function4 (LagFilter_sf) */
22831 {
22832 SimStruct *childS = ssGetSFunction(rts, 128);
22833
22834 /* timing info */
22835 static time_T sfcnPeriod[1];
22836 static time_T sfcnOffset[1];
22837 static int_T sfcnTsMap[1];
22838 (void) memset((void*)sfcnPeriod, 0,
22839 sizeof(time_T)*1);
22840 (void) memset((void*)sfcnOffset, 0,
22841 sizeof(time_T)*1);
22842 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
22843 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
22844 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
22845
22846 /* Set up the mdlInfo pointer */
22847# ifdef USE_RTMODEL
22848
22849 {
22850 static struct _ssBlkInfo2 _blkInfo2;
22851 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
22852 ssSetBlkInfo2Ptr(childS, blkInfo2);
22853 }
22854
22855 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
22856
22857# else
22858
22859 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
22860
22861# endif /* USE_RTMODEL */
22862
22863 /* Allocate memory of model methods 2 */
22864 {
22865 static struct _ssSFcnModelMethods2 methods2;
22866 ssSetModelMethods2(childS, &methods2);
22867 }
22868
22869 /* Allocate memory of model methods 3 */
22870 {
22871 static struct _ssSFcnModelMethods3 methods3;
22872 ssSetModelMethods3(childS, &methods3);
22873 }
22874
22875 /* Allocate memory for states auxilliary information */
22876 {
22877 static struct _ssStatesInfo2 statesInfo2;
22878 static ssPeriodicStatesInfo periodicStatesInfo;
22879 ssSetStatesInfo2(childS, &statesInfo2);
22880 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
22881 }
22882
22883 /* inputs */
22884 {
22885 static struct _ssPortInputs inputPortInfo[6];
22886 _ssSetNumInputPorts(childS, 6);
22887 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
22888
22889 /* port 0 */
22890 {
22891 static real32_T const *sfcnUPtrs[1];
22892 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
22893 ssGetLocalBlockIO(rts))->dtCAS;
22894 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
22895 _ssSetInputPortNumDimensions(childS, 0, 1);
22896 ssSetInputPortWidth(childS, 0, 1);
22897 }
22898
22899 /* port 1 */
22900 {
22901 static int8_T const *sfcnUPtrs[1];
22902 sfcnUPtrs[0] = (int8_T const *) &AFCS_MODEL1_ConstP.pooled143;
22903 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
22904 _ssSetInputPortNumDimensions(childS, 1, 1);
22905 ssSetInputPortWidth(childS, 1, 1);
22906 }
22907
22908 /* port 2 */
22909 {
22910 static real32_T const *sfcnUPtrs[1];
22911 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled126;
22912 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
22913 _ssSetInputPortNumDimensions(childS, 2, 1);
22914 ssSetInputPortWidth(childS, 2, 1);
22915 }
22916
22917 /* port 3 */
22918 {
22919 static real32_T const *sfcnUPtrs[1];
22920 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
22921 ssGetLocalBlockIO(rts))->Saturation1_o;
22922 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
22923 _ssSetInputPortNumDimensions(childS, 3, 1);
22924 ssSetInputPortWidth(childS, 3, 1);
22925 }
22926
22927 /* port 4 */
22928 {
22929 static real32_T const *sfcnUPtrs[1];
22930 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
22931 ssGetLocalBlockIO(rts))->Saturation1_o;
22932 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
22933 _ssSetInputPortNumDimensions(childS, 4, 1);
22934 ssSetInputPortWidth(childS, 4, 1);
22935 }
22936
22937 /* port 5 */
22938 {
22939 static real32_T const *sfcnUPtrs[1];
22940 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
22941 ssGetLocalBlockIO(rts))->Saturation1_o;
22942 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
22943 _ssSetInputPortNumDimensions(childS, 5, 1);
22944 ssSetInputPortWidth(childS, 5, 1);
22945 }
22946 }
22947
22948 /* outputs */
22949 {
22950 static struct _ssPortOutputs outputPortInfo[1];
22951 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
22952 _ssSetNumOutputPorts(childS, 1);
22953
22954 /* port 0 */
22955 {
22956 _ssSetOutputPortNumDimensions(childS, 0, 1);
22957 ssSetOutputPortWidth(childS, 0, 1);
22958 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
22959 *) ssGetLocalBlockIO(rts))->GeneratedSFunction4_ab));
22960 }
22961 }
22962
22963 /* path info */
22964 _ssSetModelName(childS, "LagFilter_sf");
22965 _ssSetPath(childS,
22966 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/CAS/latTdaclda1/lat/ lag filter1/Generated S-Function4");
22967 if (ssGetRTModel(rts) == (NULL)) {
22968 _ssSetParentSS(childS, rts);
22969 _ssSetRootSS(childS, ssGetRootSS(rts));
22970 } else {
22971 ssSetRTModel(childS,ssGetRTModel(rts));
22972 _ssSetParentSS(childS, (NULL));
22973 _ssSetRootSS(childS, childS);
22974 }
22975
22976 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
22977
22978 /* work vectors */
22979 {
22980 static struct _ssDWorkRecord dWorkRecord[4];
22981 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
22982 ssSetSFcnDWork(childS, dWorkRecord);
22983 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
22984 _ssSetNumDWork(childS, 4);
22985
22986 /* DWORK0 */
22987 ssSetDWorkWidth(childS, 0, 1);
22988 ssSetDWorkDataType(childS, 0,SS_SINGLE);
22989 ssSetDWorkComplexSignal(childS, 0, 0);
22990 ssSetDWorkUsedAsDState(childS, 0, 1);
22991 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 245))[0]);
22992
22993 /* DWORK1 */
22994 ssSetDWorkWidth(childS, 1, 1);
22995 ssSetDWorkDataType(childS, 1,SS_SINGLE);
22996 ssSetDWorkComplexSignal(childS, 1, 0);
22997 ssSetDWorkUsedAsDState(childS, 1, 1);
22998 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 246))[0]);
22999
23000 /* DWORK2 */
23001 ssSetDWorkWidth(childS, 2, 1);
23002 ssSetDWorkDataType(childS, 2,SS_INT8);
23003 ssSetDWorkComplexSignal(childS, 2, 0);
23004 ssSetDWorkUsedAsDState(childS, 2, 1);
23005 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 473))[0]);
23006
23007 /* DWORK3 */
23008 ssSetDWorkWidth(childS, 3, 1);
23009 ssSetDWorkDataType(childS, 3,SS_INT8);
23010 ssSetDWorkComplexSignal(childS, 3, 0);
23011 ssSetDWorkUsedAsDState(childS, 3, 1);
23012 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 474))[0]);
23013 }
23014
23015 /* registration */
23016 LagFilter_sf(childS);
23017 sfcnInitializeSizes(childS);
23018 sfcnInitializeSampleTimes(childS);
23019
23020 /* adjust sample time */
23021 ssSetSampleTime(childS, 0, 0.0);
23022 ssSetOffsetTime(childS, 0, 0.0);
23023 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
23024
23025 /* set compiled values of dynamic vector attributes */
23026 ssSetNumNonsampledZCs(childS, 0);
23027
23028 /* Update connectivity flags for each port */
23029 _ssSetInputPortConnected(childS, 0, 1);
23030 _ssSetInputPortConnected(childS, 1, 1);
23031 _ssSetInputPortConnected(childS, 2, 1);
23032 _ssSetInputPortConnected(childS, 3, 1);
23033 _ssSetInputPortConnected(childS, 4, 1);
23034 _ssSetInputPortConnected(childS, 5, 1);
23035 _ssSetOutputPortConnected(childS, 0, 1);
23036 _ssSetOutputPortBeingMerged(childS, 0, 0);
23037
23038 /* Update the BufferDstPort flags for each input port */
23039 _ssSetInputPortBufferDstPort(childS, 0, -1);
23040 _ssSetInputPortBufferDstPort(childS, 1, -1);
23041 _ssSetInputPortBufferDstPort(childS, 2, -1);
23042 _ssSetInputPortBufferDstPort(childS, 3, -1);
23043 _ssSetInputPortBufferDstPort(childS, 4, -1);
23044 _ssSetInputPortBufferDstPort(childS, 5, -1);
23045
23046 /* Instance data for generated S-Function: LagFilter */
23047 {
23048 SimStruct *rts = childS;
23049
23050#include "LagFilter_sfcn_rtw/LagFilter_sid.h"
23051
23052 }
23053 }
23054
23055 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S238>/Generated S-Function8 (WashoutFilter_sf) */
23056 {
23057 SimStruct *childS = ssGetSFunction(rts, 129);
23058
23059 /* timing info */
23060 static time_T sfcnPeriod[1];
23061 static time_T sfcnOffset[1];
23062 static int_T sfcnTsMap[1];
23063 (void) memset((void*)sfcnPeriod, 0,
23064 sizeof(time_T)*1);
23065 (void) memset((void*)sfcnOffset, 0,
23066 sizeof(time_T)*1);
23067 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
23068 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
23069 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
23070
23071 /* Set up the mdlInfo pointer */
23072# ifdef USE_RTMODEL
23073
23074 {
23075 static struct _ssBlkInfo2 _blkInfo2;
23076 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
23077 ssSetBlkInfo2Ptr(childS, blkInfo2);
23078 }
23079
23080 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
23081
23082# else
23083
23084 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
23085
23086# endif /* USE_RTMODEL */
23087
23088 /* Allocate memory of model methods 2 */
23089 {
23090 static struct _ssSFcnModelMethods2 methods2;
23091 ssSetModelMethods2(childS, &methods2);
23092 }
23093
23094 /* Allocate memory of model methods 3 */
23095 {
23096 static struct _ssSFcnModelMethods3 methods3;
23097 ssSetModelMethods3(childS, &methods3);
23098 }
23099
23100 /* Allocate memory for states auxilliary information */
23101 {
23102 static struct _ssStatesInfo2 statesInfo2;
23103 static ssPeriodicStatesInfo periodicStatesInfo;
23104 ssSetStatesInfo2(childS, &statesInfo2);
23105 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
23106 }
23107
23108 /* inputs */
23109 {
23110 static struct _ssPortInputs inputPortInfo[6];
23111 _ssSetNumInputPorts(childS, 6);
23112 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
23113
23114 /* port 0 */
23115 {
23116 static real32_T const *sfcnUPtrs[1];
23117 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
23118 ssGetLocalBlockIO(rts))->dtCAS;
23119 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
23120 _ssSetInputPortNumDimensions(childS, 0, 1);
23121 ssSetInputPortWidth(childS, 0, 1);
23122 }
23123
23124 /* port 1 */
23125 {
23126 static int8_T const *sfcnUPtrs[1];
23127 sfcnUPtrs[0] = (int8_T const *) &AFCS_MODEL1_ConstP.pooled143;
23128 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
23129 _ssSetInputPortNumDimensions(childS, 1, 1);
23130 ssSetInputPortWidth(childS, 1, 1);
23131 }
23132
23133 /* port 2 */
23134 {
23135 static real32_T const *sfcnUPtrs[1];
23136 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled109;
23137 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
23138 _ssSetInputPortNumDimensions(childS, 2, 1);
23139 ssSetInputPortWidth(childS, 2, 1);
23140 }
23141
23142 /* port 3 */
23143 {
23144 static real32_T const *sfcnUPtrs[1];
23145 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
23146 ssGetLocalBlockIO(rts))->Saturation1_o;
23147 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
23148 _ssSetInputPortNumDimensions(childS, 3, 1);
23149 ssSetInputPortWidth(childS, 3, 1);
23150 }
23151
23152 /* port 4 */
23153 {
23154 static real32_T const *sfcnUPtrs[1];
23155 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
23156 ssGetLocalBlockIO(rts))->Saturation1_o;
23157 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
23158 _ssSetInputPortNumDimensions(childS, 4, 1);
23159 ssSetInputPortWidth(childS, 4, 1);
23160 }
23161
23162 /* port 5 */
23163 {
23164 static real32_T const *sfcnUPtrs[1];
23165 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
23166 ssGetLocalBlockIO(rts))->GeneratedSFunction4_ab;
23167 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
23168 _ssSetInputPortNumDimensions(childS, 5, 1);
23169 ssSetInputPortWidth(childS, 5, 1);
23170 }
23171 }
23172
23173 /* outputs */
23174 {
23175 static struct _ssPortOutputs outputPortInfo[1];
23176 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
23177 _ssSetNumOutputPorts(childS, 1);
23178
23179 /* port 0 */
23180 {
23181 _ssSetOutputPortNumDimensions(childS, 0, 1);
23182 ssSetOutputPortWidth(childS, 0, 1);
23183 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
23184 *) ssGetLocalBlockIO(rts))->GeneratedSFunction8));
23185 }
23186 }
23187
23188 /* path info */
23189 _ssSetModelName(childS, "WashoutFilter_sf");
23190 _ssSetPath(childS,
23191 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/CAS/latTdaclda1/lat/ high pass filter/Generated S-Function8");
23192 if (ssGetRTModel(rts) == (NULL)) {
23193 _ssSetParentSS(childS, rts);
23194 _ssSetRootSS(childS, ssGetRootSS(rts));
23195 } else {
23196 ssSetRTModel(childS,ssGetRTModel(rts));
23197 _ssSetParentSS(childS, (NULL));
23198 _ssSetRootSS(childS, childS);
23199 }
23200
23201 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
23202
23203 /* work vectors */
23204 {
23205 static struct _ssDWorkRecord dWorkRecord[4];
23206 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
23207 ssSetSFcnDWork(childS, dWorkRecord);
23208 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
23209 _ssSetNumDWork(childS, 4);
23210
23211 /* DWORK0 */
23212 ssSetDWorkWidth(childS, 0, 1);
23213 ssSetDWorkDataType(childS, 0,SS_SINGLE);
23214 ssSetDWorkComplexSignal(childS, 0, 0);
23215 ssSetDWorkUsedAsDState(childS, 0, 1);
23216 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 247))[0]);
23217
23218 /* DWORK1 */
23219 ssSetDWorkWidth(childS, 1, 1);
23220 ssSetDWorkDataType(childS, 1,SS_SINGLE);
23221 ssSetDWorkComplexSignal(childS, 1, 0);
23222 ssSetDWorkUsedAsDState(childS, 1, 1);
23223 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 248))[0]);
23224
23225 /* DWORK2 */
23226 ssSetDWorkWidth(childS, 2, 1);
23227 ssSetDWorkDataType(childS, 2,SS_INT8);
23228 ssSetDWorkComplexSignal(childS, 2, 0);
23229 ssSetDWorkUsedAsDState(childS, 2, 1);
23230 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 475))[0]);
23231
23232 /* DWORK3 */
23233 ssSetDWorkWidth(childS, 3, 1);
23234 ssSetDWorkDataType(childS, 3,SS_INT8);
23235 ssSetDWorkComplexSignal(childS, 3, 0);
23236 ssSetDWorkUsedAsDState(childS, 3, 1);
23237 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 476))[0]);
23238 }
23239
23240 /* registration */
23241 WashoutFilter_sf(childS);
23242 sfcnInitializeSizes(childS);
23243 sfcnInitializeSampleTimes(childS);
23244
23245 /* adjust sample time */
23246 ssSetSampleTime(childS, 0, 0.0);
23247 ssSetOffsetTime(childS, 0, 0.0);
23248 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
23249
23250 /* set compiled values of dynamic vector attributes */
23251 ssSetNumNonsampledZCs(childS, 0);
23252
23253 /* Update connectivity flags for each port */
23254 _ssSetInputPortConnected(childS, 0, 1);
23255 _ssSetInputPortConnected(childS, 1, 1);
23256 _ssSetInputPortConnected(childS, 2, 1);
23257 _ssSetInputPortConnected(childS, 3, 1);
23258 _ssSetInputPortConnected(childS, 4, 1);
23259 _ssSetInputPortConnected(childS, 5, 1);
23260 _ssSetOutputPortConnected(childS, 0, 1);
23261 _ssSetOutputPortBeingMerged(childS, 0, 0);
23262
23263 /* Update the BufferDstPort flags for each input port */
23264 _ssSetInputPortBufferDstPort(childS, 0, -1);
23265 _ssSetInputPortBufferDstPort(childS, 1, -1);
23266 _ssSetInputPortBufferDstPort(childS, 2, -1);
23267 _ssSetInputPortBufferDstPort(childS, 3, -1);
23268 _ssSetInputPortBufferDstPort(childS, 4, -1);
23269 _ssSetInputPortBufferDstPort(childS, 5, -1);
23270
23271 /* Instance data for generated S-Function: WashoutFilter */
23272 {
23273 SimStruct *rts = childS;
23274
23275#include "WashoutFilter_sfcn_rtw/WashoutFilter_sid.h"
23276
23277 }
23278 }
23279
23280 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S244>/Generated S-Function (Gain_sf) */
23281 {
23282 SimStruct *childS = ssGetSFunction(rts, 130);
23283
23284 /* timing info */
23285 static time_T sfcnPeriod[1];
23286 static time_T sfcnOffset[1];
23287 static int_T sfcnTsMap[1];
23288 (void) memset((void*)sfcnPeriod, 0,
23289 sizeof(time_T)*1);
23290 (void) memset((void*)sfcnOffset, 0,
23291 sizeof(time_T)*1);
23292 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
23293 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
23294 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
23295
23296 /* Set up the mdlInfo pointer */
23297# ifdef USE_RTMODEL
23298
23299 {
23300 static struct _ssBlkInfo2 _blkInfo2;
23301 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
23302 ssSetBlkInfo2Ptr(childS, blkInfo2);
23303 }
23304
23305 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
23306
23307# else
23308
23309 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
23310
23311# endif /* USE_RTMODEL */
23312
23313 /* Allocate memory of model methods 2 */
23314 {
23315 static struct _ssSFcnModelMethods2 methods2;
23316 ssSetModelMethods2(childS, &methods2);
23317 }
23318
23319 /* Allocate memory of model methods 3 */
23320 {
23321 static struct _ssSFcnModelMethods3 methods3;
23322 ssSetModelMethods3(childS, &methods3);
23323 }
23324
23325 /* Allocate memory for states auxilliary information */
23326 {
23327 static struct _ssStatesInfo2 statesInfo2;
23328 static ssPeriodicStatesInfo periodicStatesInfo;
23329 ssSetStatesInfo2(childS, &statesInfo2);
23330 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
23331 }
23332
23333 /* inputs */
23334 {
23335 static struct _ssPortInputs inputPortInfo[2];
23336 _ssSetNumInputPorts(childS, 2);
23337 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
23338
23339 /* port 0 */
23340 {
23341 static real32_T const *sfcnUPtrs[1];
23342 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
23343 ssGetLocalBlockIO(rts))->GeneratedSFunction8;
23344 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
23345 _ssSetInputPortNumDimensions(childS, 0, 1);
23346 ssSetInputPortWidth(childS, 0, 1);
23347 }
23348
23349 /* port 1 */
23350 {
23351 static real32_T const *sfcnUPtrs[1];
23352 sfcnUPtrs[0] = (real32_T const *)
23353 &AFCS_MODEL1_ConstP.Constant23_Value;
23354 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
23355 _ssSetInputPortNumDimensions(childS, 1, 1);
23356 ssSetInputPortWidth(childS, 1, 1);
23357 }
23358 }
23359
23360 /* outputs */
23361 {
23362 static struct _ssPortOutputs outputPortInfo[1];
23363 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
23364 _ssSetNumOutputPorts(childS, 1);
23365
23366 /* port 0 */
23367 {
23368 _ssSetOutputPortNumDimensions(childS, 0, 1);
23369 ssSetOutputPortWidth(childS, 0, 1);
23370 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
23371 *) ssGetLocalBlockIO(rts))->MinMax));
23372 }
23373 }
23374
23375 /* path info */
23376 _ssSetModelName(childS, "Gain_sf");
23377 _ssSetPath(childS,
23378 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/CAS/latTdaclda1/lat/gain2/Generated S-Function");
23379 if (ssGetRTModel(rts) == (NULL)) {
23380 _ssSetParentSS(childS, rts);
23381 _ssSetRootSS(childS, ssGetRootSS(rts));
23382 } else {
23383 ssSetRTModel(childS,ssGetRTModel(rts));
23384 _ssSetParentSS(childS, (NULL));
23385 _ssSetRootSS(childS, childS);
23386 }
23387
23388 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
23389
23390 /* registration */
23391 Gain_sf(childS);
23392 sfcnInitializeSizes(childS);
23393 sfcnInitializeSampleTimes(childS);
23394
23395 /* adjust sample time */
23396 ssSetSampleTime(childS, 0, 0.0);
23397 ssSetOffsetTime(childS, 0, 0.0);
23398 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
23399
23400 /* set compiled values of dynamic vector attributes */
23401 ssSetNumNonsampledZCs(childS, 0);
23402
23403 /* Update connectivity flags for each port */
23404 _ssSetInputPortConnected(childS, 0, 1);
23405 _ssSetInputPortConnected(childS, 1, 1);
23406 _ssSetOutputPortConnected(childS, 0, 1);
23407 _ssSetOutputPortBeingMerged(childS, 0, 0);
23408
23409 /* Update the BufferDstPort flags for each input port */
23410 _ssSetInputPortBufferDstPort(childS, 0, -1);
23411 _ssSetInputPortBufferDstPort(childS, 1, -1);
23412
23413 /* Instance data for generated S-Function: Gain */
23414 {
23415 SimStruct *rts = childS;
23416
23417#include "Gain_sfcn_rtw/Gain_sid.h"
23418
23419 }
23420 }
23421
23422 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S243>/Generated S-Function (Gain_sf) */
23423 {
23424 SimStruct *childS = ssGetSFunction(rts, 131);
23425
23426 /* timing info */
23427 static time_T sfcnPeriod[1];
23428 static time_T sfcnOffset[1];
23429 static int_T sfcnTsMap[1];
23430 (void) memset((void*)sfcnPeriod, 0,
23431 sizeof(time_T)*1);
23432 (void) memset((void*)sfcnOffset, 0,
23433 sizeof(time_T)*1);
23434 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
23435 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
23436 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
23437
23438 /* Set up the mdlInfo pointer */
23439# ifdef USE_RTMODEL
23440
23441 {
23442 static struct _ssBlkInfo2 _blkInfo2;
23443 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
23444 ssSetBlkInfo2Ptr(childS, blkInfo2);
23445 }
23446
23447 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
23448
23449# else
23450
23451 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
23452
23453# endif /* USE_RTMODEL */
23454
23455 /* Allocate memory of model methods 2 */
23456 {
23457 static struct _ssSFcnModelMethods2 methods2;
23458 ssSetModelMethods2(childS, &methods2);
23459 }
23460
23461 /* Allocate memory of model methods 3 */
23462 {
23463 static struct _ssSFcnModelMethods3 methods3;
23464 ssSetModelMethods3(childS, &methods3);
23465 }
23466
23467 /* Allocate memory for states auxilliary information */
23468 {
23469 static struct _ssStatesInfo2 statesInfo2;
23470 static ssPeriodicStatesInfo periodicStatesInfo;
23471 ssSetStatesInfo2(childS, &statesInfo2);
23472 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
23473 }
23474
23475 /* inputs */
23476 {
23477 static struct _ssPortInputs inputPortInfo[2];
23478 _ssSetNumInputPorts(childS, 2);
23479 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
23480
23481 /* port 0 */
23482 {
23483 static real32_T const *sfcnUPtrs[1];
23484 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
23485 ssGetLocalBlockIO(rts))->Sum5;
23486 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
23487 _ssSetInputPortNumDimensions(childS, 0, 1);
23488 ssSetInputPortWidth(childS, 0, 1);
23489 }
23490
23491 /* port 1 */
23492 {
23493 static real32_T const *sfcnUPtrs[1];
23494 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
23495 ssGetLocalBlockIO(rts))->Product2_d;
23496 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
23497 _ssSetInputPortNumDimensions(childS, 1, 1);
23498 ssSetInputPortWidth(childS, 1, 1);
23499 }
23500 }
23501
23502 /* outputs */
23503 {
23504 static struct _ssPortOutputs outputPortInfo[1];
23505 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
23506 _ssSetNumOutputPorts(childS, 1);
23507
23508 /* port 0 */
23509 {
23510 _ssSetOutputPortNumDimensions(childS, 0, 1);
23511 ssSetOutputPortWidth(childS, 0, 1);
23512 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
23513 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_dc));
23514 }
23515 }
23516
23517 /* path info */
23518 _ssSetModelName(childS, "Gain_sf");
23519 _ssSetPath(childS,
23520 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/CAS/latTdaclda1/lat/gain1/Generated S-Function");
23521 if (ssGetRTModel(rts) == (NULL)) {
23522 _ssSetParentSS(childS, rts);
23523 _ssSetRootSS(childS, ssGetRootSS(rts));
23524 } else {
23525 ssSetRTModel(childS,ssGetRTModel(rts));
23526 _ssSetParentSS(childS, (NULL));
23527 _ssSetRootSS(childS, childS);
23528 }
23529
23530 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
23531
23532 /* registration */
23533 Gain_sf(childS);
23534 sfcnInitializeSizes(childS);
23535 sfcnInitializeSampleTimes(childS);
23536
23537 /* adjust sample time */
23538 ssSetSampleTime(childS, 0, 0.0);
23539 ssSetOffsetTime(childS, 0, 0.0);
23540 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
23541
23542 /* set compiled values of dynamic vector attributes */
23543 ssSetNumNonsampledZCs(childS, 0);
23544
23545 /* Update connectivity flags for each port */
23546 _ssSetInputPortConnected(childS, 0, 1);
23547 _ssSetInputPortConnected(childS, 1, 1);
23548 _ssSetOutputPortConnected(childS, 0, 1);
23549 _ssSetOutputPortBeingMerged(childS, 0, 0);
23550
23551 /* Update the BufferDstPort flags for each input port */
23552 _ssSetInputPortBufferDstPort(childS, 0, -1);
23553 _ssSetInputPortBufferDstPort(childS, 1, -1);
23554
23555 /* Instance data for generated S-Function: Gain */
23556 {
23557 SimStruct *rts = childS;
23558
23559#include "Gain_sfcn_rtw/Gain_sid.h"
23560
23561 }
23562 }
23563
23564 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S225>/Generated S-Function1 (SaturationLimiter_sf) */
23565 {
23566 SimStruct *childS = ssGetSFunction(rts, 132);
23567
23568 /* timing info */
23569 static time_T sfcnPeriod[1];
23570 static time_T sfcnOffset[1];
23571 static int_T sfcnTsMap[1];
23572 (void) memset((void*)sfcnPeriod, 0,
23573 sizeof(time_T)*1);
23574 (void) memset((void*)sfcnOffset, 0,
23575 sizeof(time_T)*1);
23576 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
23577 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
23578 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
23579
23580 /* Set up the mdlInfo pointer */
23581# ifdef USE_RTMODEL
23582
23583 {
23584 static struct _ssBlkInfo2 _blkInfo2;
23585 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
23586 ssSetBlkInfo2Ptr(childS, blkInfo2);
23587 }
23588
23589 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
23590
23591# else
23592
23593 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
23594
23595# endif /* USE_RTMODEL */
23596
23597 /* Allocate memory of model methods 2 */
23598 {
23599 static struct _ssSFcnModelMethods2 methods2;
23600 ssSetModelMethods2(childS, &methods2);
23601 }
23602
23603 /* Allocate memory of model methods 3 */
23604 {
23605 static struct _ssSFcnModelMethods3 methods3;
23606 ssSetModelMethods3(childS, &methods3);
23607 }
23608
23609 /* Allocate memory for states auxilliary information */
23610 {
23611 static struct _ssStatesInfo2 statesInfo2;
23612 static ssPeriodicStatesInfo periodicStatesInfo;
23613 ssSetStatesInfo2(childS, &statesInfo2);
23614 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
23615 }
23616
23617 /* inputs */
23618 {
23619 static struct _ssPortInputs inputPortInfo[3];
23620 _ssSetNumInputPorts(childS, 3);
23621 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
23622
23623 /* port 0 */
23624 {
23625 static real32_T const *sfcnUPtrs[1];
23626 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
23627 ssGetLocalBlockIO(rts))->Switch_dd;
23628 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
23629 _ssSetInputPortNumDimensions(childS, 0, 1);
23630 ssSetInputPortWidth(childS, 0, 1);
23631 }
23632
23633 /* port 1 */
23634 {
23635 static real32_T const *sfcnUPtrs[1];
23636 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled130;
23637 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
23638 _ssSetInputPortNumDimensions(childS, 1, 1);
23639 ssSetInputPortWidth(childS, 1, 1);
23640 }
23641
23642 /* port 2 */
23643 {
23644 static real32_T const *sfcnUPtrs[1];
23645 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled131;
23646 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
23647 _ssSetInputPortNumDimensions(childS, 2, 1);
23648 ssSetInputPortWidth(childS, 2, 1);
23649 }
23650 }
23651
23652 /* outputs */
23653 {
23654 static struct _ssPortOutputs outputPortInfo[1];
23655 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
23656 _ssSetNumOutputPorts(childS, 1);
23657
23658 /* port 0 */
23659 {
23660 _ssSetOutputPortNumDimensions(childS, 0, 1);
23661 ssSetOutputPortWidth(childS, 0, 1);
23662 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
23663 *) ssGetLocalBlockIO(rts))->GeneratedSFunction1_en));
23664 }
23665 }
23666
23667 /* path info */
23668 _ssSetModelName(childS, "SaturationLimiter_sf");
23669 _ssSetPath(childS,
23670 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/CAS/latTdaclda1/Saturation Limiter1/Generated S-Function1");
23671 if (ssGetRTModel(rts) == (NULL)) {
23672 _ssSetParentSS(childS, rts);
23673 _ssSetRootSS(childS, ssGetRootSS(rts));
23674 } else {
23675 ssSetRTModel(childS,ssGetRTModel(rts));
23676 _ssSetParentSS(childS, (NULL));
23677 _ssSetRootSS(childS, childS);
23678 }
23679
23680 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
23681
23682 /* registration */
23683 SaturationLimiter_sf(childS);
23684 sfcnInitializeSizes(childS);
23685 sfcnInitializeSampleTimes(childS);
23686
23687 /* adjust sample time */
23688 ssSetSampleTime(childS, 0, 0.0);
23689 ssSetOffsetTime(childS, 0, 0.0);
23690 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
23691
23692 /* set compiled values of dynamic vector attributes */
23693 ssSetNumNonsampledZCs(childS, 0);
23694
23695 /* Update connectivity flags for each port */
23696 _ssSetInputPortConnected(childS, 0, 1);
23697 _ssSetInputPortConnected(childS, 1, 1);
23698 _ssSetInputPortConnected(childS, 2, 1);
23699 _ssSetOutputPortConnected(childS, 0, 1);
23700 _ssSetOutputPortBeingMerged(childS, 0, 0);
23701
23702 /* Update the BufferDstPort flags for each input port */
23703 _ssSetInputPortBufferDstPort(childS, 0, -1);
23704 _ssSetInputPortBufferDstPort(childS, 1, -1);
23705 _ssSetInputPortBufferDstPort(childS, 2, -1);
23706
23707 /* Instance data for generated S-Function: SaturationLimiter */
23708 {
23709 SimStruct *rts = childS;
23710
23711#include "SaturationLimiter_sfcn_rtw/SaturationLimiter_sid.h"
23712
23713 }
23714 }
23715
23716 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S223>/Generated S-Function7 (RateLimiter_sf) */
23717 {
23718 SimStruct *childS = ssGetSFunction(rts, 133);
23719
23720 /* timing info */
23721 static time_T sfcnPeriod[1];
23722 static time_T sfcnOffset[1];
23723 static int_T sfcnTsMap[1];
23724 (void) memset((void*)sfcnPeriod, 0,
23725 sizeof(time_T)*1);
23726 (void) memset((void*)sfcnOffset, 0,
23727 sizeof(time_T)*1);
23728 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
23729 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
23730 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
23731
23732 /* Set up the mdlInfo pointer */
23733# ifdef USE_RTMODEL
23734
23735 {
23736 static struct _ssBlkInfo2 _blkInfo2;
23737 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
23738 ssSetBlkInfo2Ptr(childS, blkInfo2);
23739 }
23740
23741 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
23742
23743# else
23744
23745 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
23746
23747# endif /* USE_RTMODEL */
23748
23749 /* Allocate memory of model methods 2 */
23750 {
23751 static struct _ssSFcnModelMethods2 methods2;
23752 ssSetModelMethods2(childS, &methods2);
23753 }
23754
23755 /* Allocate memory of model methods 3 */
23756 {
23757 static struct _ssSFcnModelMethods3 methods3;
23758 ssSetModelMethods3(childS, &methods3);
23759 }
23760
23761 /* Allocate memory for states auxilliary information */
23762 {
23763 static struct _ssStatesInfo2 statesInfo2;
23764 static ssPeriodicStatesInfo periodicStatesInfo;
23765 ssSetStatesInfo2(childS, &statesInfo2);
23766 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
23767 }
23768
23769 /* inputs */
23770 {
23771 static struct _ssPortInputs inputPortInfo[5];
23772 _ssSetNumInputPorts(childS, 5);
23773 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
23774
23775 /* port 0 */
23776 {
23777 static int8_T const *sfcnUPtrs[1];
23778 sfcnUPtrs[0] = (int8_T const *) &AFCS_MODEL1_ConstP.pooled143;
23779 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
23780 _ssSetInputPortNumDimensions(childS, 0, 1);
23781 ssSetInputPortWidth(childS, 0, 1);
23782 }
23783
23784 /* port 1 */
23785 {
23786 static real32_T const *sfcnUPtrs[1];
23787 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
23788 ssGetLocalBlockIO(rts))->TmpSignalConversionAtCodeReus_b[4];
23789 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
23790 _ssSetInputPortNumDimensions(childS, 1, 1);
23791 ssSetInputPortWidth(childS, 1, 1);
23792 }
23793
23794 /* port 2 */
23795 {
23796 static real32_T const *sfcnUPtrs[1];
23797 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled125;
23798 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
23799 _ssSetInputPortNumDimensions(childS, 2, 1);
23800 ssSetInputPortWidth(childS, 2, 1);
23801 }
23802
23803 /* port 3 */
23804 {
23805 static real32_T const *sfcnUPtrs[1];
23806 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
23807 ssGetLocalBlockIO(rts))->dtCAS;
23808 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
23809 _ssSetInputPortNumDimensions(childS, 3, 1);
23810 ssSetInputPortWidth(childS, 3, 1);
23811 }
23812
23813 /* port 4 */
23814 {
23815 static real32_T const *sfcnUPtrs[1];
23816 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
23817 ssGetLocalBlockIO(rts))->GeneratedSFunction1_en;
23818 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
23819 _ssSetInputPortNumDimensions(childS, 4, 1);
23820 ssSetInputPortWidth(childS, 4, 1);
23821 }
23822 }
23823
23824 /* outputs */
23825 {
23826 static struct _ssPortOutputs outputPortInfo[2];
23827 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
23828 _ssSetNumOutputPorts(childS, 2);
23829
23830 /* port 0 */
23831 {
23832 _ssSetOutputPortNumDimensions(childS, 0, 1);
23833 ssSetOutputPortWidth(childS, 0, 1);
23834 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
23835 *) ssGetLocalBlockIO(rts))->Saturation8));
23836 }
23837
23838 /* port 1 */
23839 {
23840 _ssSetOutputPortNumDimensions(childS, 1, 1);
23841 ssSetOutputPortWidth(childS, 1, 1);
23842 _ssSetOutputPortSignal(childS, 1, ((real32_T *) &((B_AFCS_MODEL1_T
23843 *) ssGetLocalBlockIO(rts))->GeneratedSFunction7_o2));
23844 }
23845 }
23846
23847 /* path info */
23848 _ssSetModelName(childS, "RateLimiter_sf");
23849 _ssSetPath(childS,
23850 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/CAS/latTdaclda1/Rate Limiter1/Generated S-Function7");
23851 if (ssGetRTModel(rts) == (NULL)) {
23852 _ssSetParentSS(childS, rts);
23853 _ssSetRootSS(childS, ssGetRootSS(rts));
23854 } else {
23855 ssSetRTModel(childS,ssGetRTModel(rts));
23856 _ssSetParentSS(childS, (NULL));
23857 _ssSetRootSS(childS, childS);
23858 }
23859
23860 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
23861
23862 /* work vectors */
23863 {
23864 static struct _ssDWorkRecord dWorkRecord[3];
23865 static struct _ssDWorkAuxRecord dWorkAuxRecord[3];
23866 ssSetSFcnDWork(childS, dWorkRecord);
23867 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
23868 _ssSetNumDWork(childS, 3);
23869
23870 /* DWORK0 */
23871 ssSetDWorkWidth(childS, 0, 1);
23872 ssSetDWorkDataType(childS, 0,SS_SINGLE);
23873 ssSetDWorkComplexSignal(childS, 0, 0);
23874 ssSetDWorkUsedAsDState(childS, 0, 1);
23875 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 249))[0]);
23876
23877 /* DWORK1 */
23878 ssSetDWorkWidth(childS, 1, 1);
23879 ssSetDWorkDataType(childS, 1,SS_INT8);
23880 ssSetDWorkComplexSignal(childS, 1, 0);
23881 ssSetDWorkUsedAsDState(childS, 1, 1);
23882 _ssSetDWork(childS, 1, &((int8_T*) ssGetDWork(rts, 477))[0]);
23883
23884 /* DWORK2 */
23885 ssSetDWorkWidth(childS, 2, 1);
23886 ssSetDWorkDataType(childS, 2,SS_INT8);
23887 ssSetDWorkComplexSignal(childS, 2, 0);
23888 ssSetDWorkUsedAsDState(childS, 2, 1);
23889 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 478))[0]);
23890 }
23891
23892 /* registration */
23893 RateLimiter_sf(childS);
23894 sfcnInitializeSizes(childS);
23895 sfcnInitializeSampleTimes(childS);
23896
23897 /* adjust sample time */
23898 ssSetSampleTime(childS, 0, 0.0);
23899 ssSetOffsetTime(childS, 0, 0.0);
23900 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
23901
23902 /* set compiled values of dynamic vector attributes */
23903 ssSetNumNonsampledZCs(childS, 0);
23904
23905 /* Update connectivity flags for each port */
23906 _ssSetInputPortConnected(childS, 0, 1);
23907 _ssSetInputPortConnected(childS, 1, 1);
23908 _ssSetInputPortConnected(childS, 2, 1);
23909 _ssSetInputPortConnected(childS, 3, 1);
23910 _ssSetInputPortConnected(childS, 4, 1);
23911 _ssSetOutputPortConnected(childS, 0, 1);
23912 _ssSetOutputPortConnected(childS, 1, 1);
23913 _ssSetOutputPortBeingMerged(childS, 0, 0);
23914 _ssSetOutputPortBeingMerged(childS, 1, 0);
23915
23916 /* Update the BufferDstPort flags for each input port */
23917 _ssSetInputPortBufferDstPort(childS, 0, -1);
23918 _ssSetInputPortBufferDstPort(childS, 1, -1);
23919 _ssSetInputPortBufferDstPort(childS, 2, -1);
23920 _ssSetInputPortBufferDstPort(childS, 3, -1);
23921 _ssSetInputPortBufferDstPort(childS, 4, -1);
23922
23923 /* Instance data for generated S-Function: RateLimiter */
23924 {
23925 SimStruct *rts = childS;
23926
23927#include "RateLimiter_sfcn_rtw/RateLimiter_sid.h"
23928
23929 }
23930 }
23931
23932 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S226>/Generated S-Function1 (SaturationLimiter_sf) */
23933 {
23934 SimStruct *childS = ssGetSFunction(rts, 134);
23935
23936 /* timing info */
23937 static time_T sfcnPeriod[1];
23938 static time_T sfcnOffset[1];
23939 static int_T sfcnTsMap[1];
23940 (void) memset((void*)sfcnPeriod, 0,
23941 sizeof(time_T)*1);
23942 (void) memset((void*)sfcnOffset, 0,
23943 sizeof(time_T)*1);
23944 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
23945 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
23946 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
23947
23948 /* Set up the mdlInfo pointer */
23949# ifdef USE_RTMODEL
23950
23951 {
23952 static struct _ssBlkInfo2 _blkInfo2;
23953 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
23954 ssSetBlkInfo2Ptr(childS, blkInfo2);
23955 }
23956
23957 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
23958
23959# else
23960
23961 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
23962
23963# endif /* USE_RTMODEL */
23964
23965 /* Allocate memory of model methods 2 */
23966 {
23967 static struct _ssSFcnModelMethods2 methods2;
23968 ssSetModelMethods2(childS, &methods2);
23969 }
23970
23971 /* Allocate memory of model methods 3 */
23972 {
23973 static struct _ssSFcnModelMethods3 methods3;
23974 ssSetModelMethods3(childS, &methods3);
23975 }
23976
23977 /* Allocate memory for states auxilliary information */
23978 {
23979 static struct _ssStatesInfo2 statesInfo2;
23980 static ssPeriodicStatesInfo periodicStatesInfo;
23981 ssSetStatesInfo2(childS, &statesInfo2);
23982 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
23983 }
23984
23985 /* inputs */
23986 {
23987 static struct _ssPortInputs inputPortInfo[3];
23988 _ssSetNumInputPorts(childS, 3);
23989 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
23990
23991 /* port 0 */
23992 {
23993 static real32_T const *sfcnUPtrs[1];
23994 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
23995 ssGetLocalBlockIO(rts))->Switch_c;
23996 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
23997 _ssSetInputPortNumDimensions(childS, 0, 1);
23998 ssSetInputPortWidth(childS, 0, 1);
23999 }
24000
24001 /* port 1 */
24002 {
24003 static real32_T const *sfcnUPtrs[1];
24004 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled130;
24005 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
24006 _ssSetInputPortNumDimensions(childS, 1, 1);
24007 ssSetInputPortWidth(childS, 1, 1);
24008 }
24009
24010 /* port 2 */
24011 {
24012 static real32_T const *sfcnUPtrs[1];
24013 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled131;
24014 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
24015 _ssSetInputPortNumDimensions(childS, 2, 1);
24016 ssSetInputPortWidth(childS, 2, 1);
24017 }
24018 }
24019
24020 /* outputs */
24021 {
24022 static struct _ssPortOutputs outputPortInfo[1];
24023 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
24024 _ssSetNumOutputPorts(childS, 1);
24025
24026 /* port 0 */
24027 {
24028 _ssSetOutputPortNumDimensions(childS, 0, 1);
24029 ssSetOutputPortWidth(childS, 0, 1);
24030 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
24031 *) ssGetLocalBlockIO(rts))->GeneratedSFunction1_or));
24032 }
24033 }
24034
24035 /* path info */
24036 _ssSetModelName(childS, "SaturationLimiter_sf");
24037 _ssSetPath(childS,
24038 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/CAS/latTdaclda1/Saturation Limiter4/Generated S-Function1");
24039 if (ssGetRTModel(rts) == (NULL)) {
24040 _ssSetParentSS(childS, rts);
24041 _ssSetRootSS(childS, ssGetRootSS(rts));
24042 } else {
24043 ssSetRTModel(childS,ssGetRTModel(rts));
24044 _ssSetParentSS(childS, (NULL));
24045 _ssSetRootSS(childS, childS);
24046 }
24047
24048 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
24049
24050 /* registration */
24051 SaturationLimiter_sf(childS);
24052 sfcnInitializeSizes(childS);
24053 sfcnInitializeSampleTimes(childS);
24054
24055 /* adjust sample time */
24056 ssSetSampleTime(childS, 0, 0.0);
24057 ssSetOffsetTime(childS, 0, 0.0);
24058 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
24059
24060 /* set compiled values of dynamic vector attributes */
24061 ssSetNumNonsampledZCs(childS, 0);
24062
24063 /* Update connectivity flags for each port */
24064 _ssSetInputPortConnected(childS, 0, 1);
24065 _ssSetInputPortConnected(childS, 1, 1);
24066 _ssSetInputPortConnected(childS, 2, 1);
24067 _ssSetOutputPortConnected(childS, 0, 1);
24068 _ssSetOutputPortBeingMerged(childS, 0, 0);
24069
24070 /* Update the BufferDstPort flags for each input port */
24071 _ssSetInputPortBufferDstPort(childS, 0, -1);
24072 _ssSetInputPortBufferDstPort(childS, 1, -1);
24073 _ssSetInputPortBufferDstPort(childS, 2, -1);
24074
24075 /* Instance data for generated S-Function: SaturationLimiter */
24076 {
24077 SimStruct *rts = childS;
24078
24079#include "SaturationLimiter_sfcn_rtw/SaturationLimiter_sid.h"
24080
24081 }
24082 }
24083
24084 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S224>/Generated S-Function7 (RateLimiter_sf) */
24085 {
24086 SimStruct *childS = ssGetSFunction(rts, 135);
24087
24088 /* timing info */
24089 static time_T sfcnPeriod[1];
24090 static time_T sfcnOffset[1];
24091 static int_T sfcnTsMap[1];
24092 (void) memset((void*)sfcnPeriod, 0,
24093 sizeof(time_T)*1);
24094 (void) memset((void*)sfcnOffset, 0,
24095 sizeof(time_T)*1);
24096 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
24097 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
24098 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
24099
24100 /* Set up the mdlInfo pointer */
24101# ifdef USE_RTMODEL
24102
24103 {
24104 static struct _ssBlkInfo2 _blkInfo2;
24105 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
24106 ssSetBlkInfo2Ptr(childS, blkInfo2);
24107 }
24108
24109 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
24110
24111# else
24112
24113 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
24114
24115# endif /* USE_RTMODEL */
24116
24117 /* Allocate memory of model methods 2 */
24118 {
24119 static struct _ssSFcnModelMethods2 methods2;
24120 ssSetModelMethods2(childS, &methods2);
24121 }
24122
24123 /* Allocate memory of model methods 3 */
24124 {
24125 static struct _ssSFcnModelMethods3 methods3;
24126 ssSetModelMethods3(childS, &methods3);
24127 }
24128
24129 /* Allocate memory for states auxilliary information */
24130 {
24131 static struct _ssStatesInfo2 statesInfo2;
24132 static ssPeriodicStatesInfo periodicStatesInfo;
24133 ssSetStatesInfo2(childS, &statesInfo2);
24134 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
24135 }
24136
24137 /* inputs */
24138 {
24139 static struct _ssPortInputs inputPortInfo[5];
24140 _ssSetNumInputPorts(childS, 5);
24141 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
24142
24143 /* port 0 */
24144 {
24145 static int8_T const *sfcnUPtrs[1];
24146 sfcnUPtrs[0] = (int8_T const *) &AFCS_MODEL1_ConstP.pooled143;
24147 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
24148 _ssSetInputPortNumDimensions(childS, 0, 1);
24149 ssSetInputPortWidth(childS, 0, 1);
24150 }
24151
24152 /* port 1 */
24153 {
24154 static real32_T const *sfcnUPtrs[1];
24155 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
24156 ssGetLocalBlockIO(rts))->Gain1_o;
24157 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
24158 _ssSetInputPortNumDimensions(childS, 1, 1);
24159 ssSetInputPortWidth(childS, 1, 1);
24160 }
24161
24162 /* port 2 */
24163 {
24164 static real32_T const *sfcnUPtrs[1];
24165 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled125;
24166 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
24167 _ssSetInputPortNumDimensions(childS, 2, 1);
24168 ssSetInputPortWidth(childS, 2, 1);
24169 }
24170
24171 /* port 3 */
24172 {
24173 static real32_T const *sfcnUPtrs[1];
24174 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
24175 ssGetLocalBlockIO(rts))->dtCAS;
24176 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
24177 _ssSetInputPortNumDimensions(childS, 3, 1);
24178 ssSetInputPortWidth(childS, 3, 1);
24179 }
24180
24181 /* port 4 */
24182 {
24183 static real32_T const *sfcnUPtrs[1];
24184 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
24185 ssGetLocalBlockIO(rts))->GeneratedSFunction1_or;
24186 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
24187 _ssSetInputPortNumDimensions(childS, 4, 1);
24188 ssSetInputPortWidth(childS, 4, 1);
24189 }
24190 }
24191
24192 /* outputs */
24193 {
24194 static struct _ssPortOutputs outputPortInfo[2];
24195 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
24196 _ssSetNumOutputPorts(childS, 2);
24197
24198 /* port 0 */
24199 {
24200 _ssSetOutputPortNumDimensions(childS, 0, 1);
24201 ssSetOutputPortWidth(childS, 0, 1);
24202 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
24203 *) ssGetLocalBlockIO(rts))->drint));
24204 }
24205
24206 /* port 1 */
24207 {
24208 _ssSetOutputPortNumDimensions(childS, 1, 1);
24209 ssSetOutputPortWidth(childS, 1, 1);
24210 _ssSetOutputPortSignal(childS, 1, ((real32_T *) &((B_AFCS_MODEL1_T
24211 *) ssGetLocalBlockIO(rts))->GeneratedSFunction7_o2_i));
24212 }
24213 }
24214
24215 /* path info */
24216 _ssSetModelName(childS, "RateLimiter_sf");
24217 _ssSetPath(childS,
24218 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/CAS/latTdaclda1/Rate Limiter3/Generated S-Function7");
24219 if (ssGetRTModel(rts) == (NULL)) {
24220 _ssSetParentSS(childS, rts);
24221 _ssSetRootSS(childS, ssGetRootSS(rts));
24222 } else {
24223 ssSetRTModel(childS,ssGetRTModel(rts));
24224 _ssSetParentSS(childS, (NULL));
24225 _ssSetRootSS(childS, childS);
24226 }
24227
24228 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
24229
24230 /* work vectors */
24231 {
24232 static struct _ssDWorkRecord dWorkRecord[3];
24233 static struct _ssDWorkAuxRecord dWorkAuxRecord[3];
24234 ssSetSFcnDWork(childS, dWorkRecord);
24235 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
24236 _ssSetNumDWork(childS, 3);
24237
24238 /* DWORK0 */
24239 ssSetDWorkWidth(childS, 0, 1);
24240 ssSetDWorkDataType(childS, 0,SS_SINGLE);
24241 ssSetDWorkComplexSignal(childS, 0, 0);
24242 ssSetDWorkUsedAsDState(childS, 0, 1);
24243 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 250))[0]);
24244
24245 /* DWORK1 */
24246 ssSetDWorkWidth(childS, 1, 1);
24247 ssSetDWorkDataType(childS, 1,SS_INT8);
24248 ssSetDWorkComplexSignal(childS, 1, 0);
24249 ssSetDWorkUsedAsDState(childS, 1, 1);
24250 _ssSetDWork(childS, 1, &((int8_T*) ssGetDWork(rts, 479))[0]);
24251
24252 /* DWORK2 */
24253 ssSetDWorkWidth(childS, 2, 1);
24254 ssSetDWorkDataType(childS, 2,SS_INT8);
24255 ssSetDWorkComplexSignal(childS, 2, 0);
24256 ssSetDWorkUsedAsDState(childS, 2, 1);
24257 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 480))[0]);
24258 }
24259
24260 /* registration */
24261 RateLimiter_sf(childS);
24262 sfcnInitializeSizes(childS);
24263 sfcnInitializeSampleTimes(childS);
24264
24265 /* adjust sample time */
24266 ssSetSampleTime(childS, 0, 0.0);
24267 ssSetOffsetTime(childS, 0, 0.0);
24268 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
24269
24270 /* set compiled values of dynamic vector attributes */
24271 ssSetNumNonsampledZCs(childS, 0);
24272
24273 /* Update connectivity flags for each port */
24274 _ssSetInputPortConnected(childS, 0, 1);
24275 _ssSetInputPortConnected(childS, 1, 1);
24276 _ssSetInputPortConnected(childS, 2, 1);
24277 _ssSetInputPortConnected(childS, 3, 1);
24278 _ssSetInputPortConnected(childS, 4, 1);
24279 _ssSetOutputPortConnected(childS, 0, 1);
24280 _ssSetOutputPortConnected(childS, 1, 1);
24281 _ssSetOutputPortBeingMerged(childS, 0, 0);
24282 _ssSetOutputPortBeingMerged(childS, 1, 0);
24283
24284 /* Update the BufferDstPort flags for each input port */
24285 _ssSetInputPortBufferDstPort(childS, 0, -1);
24286 _ssSetInputPortBufferDstPort(childS, 1, -1);
24287 _ssSetInputPortBufferDstPort(childS, 2, -1);
24288 _ssSetInputPortBufferDstPort(childS, 3, -1);
24289 _ssSetInputPortBufferDstPort(childS, 4, -1);
24290
24291 /* Instance data for generated S-Function: RateLimiter */
24292 {
24293 SimStruct *rts = childS;
24294
24295#include "RateLimiter_sfcn_rtw/RateLimiter_sid.h"
24296
24297 }
24298 }
24299
24300 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S252>/Generated S-Function8 (WashoutFilter_sf) */
24301 {
24302 SimStruct *childS = ssGetSFunction(rts, 136);
24303
24304 /* timing info */
24305 static time_T sfcnPeriod[1];
24306 static time_T sfcnOffset[1];
24307 static int_T sfcnTsMap[1];
24308 (void) memset((void*)sfcnPeriod, 0,
24309 sizeof(time_T)*1);
24310 (void) memset((void*)sfcnOffset, 0,
24311 sizeof(time_T)*1);
24312 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
24313 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
24314 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
24315
24316 /* Set up the mdlInfo pointer */
24317# ifdef USE_RTMODEL
24318
24319 {
24320 static struct _ssBlkInfo2 _blkInfo2;
24321 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
24322 ssSetBlkInfo2Ptr(childS, blkInfo2);
24323 }
24324
24325 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
24326
24327# else
24328
24329 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
24330
24331# endif /* USE_RTMODEL */
24332
24333 /* Allocate memory of model methods 2 */
24334 {
24335 static struct _ssSFcnModelMethods2 methods2;
24336 ssSetModelMethods2(childS, &methods2);
24337 }
24338
24339 /* Allocate memory of model methods 3 */
24340 {
24341 static struct _ssSFcnModelMethods3 methods3;
24342 ssSetModelMethods3(childS, &methods3);
24343 }
24344
24345 /* Allocate memory for states auxilliary information */
24346 {
24347 static struct _ssStatesInfo2 statesInfo2;
24348 static ssPeriodicStatesInfo periodicStatesInfo;
24349 ssSetStatesInfo2(childS, &statesInfo2);
24350 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
24351 }
24352
24353 /* inputs */
24354 {
24355 static struct _ssPortInputs inputPortInfo[6];
24356 _ssSetNumInputPorts(childS, 6);
24357 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
24358
24359 /* port 0 */
24360 {
24361 static real32_T const *sfcnUPtrs[1];
24362 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
24363 ssGetLocalBlockIO(rts))->dtCAS;
24364 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
24365 _ssSetInputPortNumDimensions(childS, 0, 1);
24366 ssSetInputPortWidth(childS, 0, 1);
24367 }
24368
24369 /* port 1 */
24370 {
24371 static int8_T const *sfcnUPtrs[1];
24372 sfcnUPtrs[0] = (int8_T const *) &AFCS_MODEL1_ConstP.pooled143;
24373 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
24374 _ssSetInputPortNumDimensions(childS, 1, 1);
24375 ssSetInputPortWidth(childS, 1, 1);
24376 }
24377
24378 /* port 2 */
24379 {
24380 static real32_T const *sfcnUPtrs[1];
24381 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled109;
24382 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
24383 _ssSetInputPortNumDimensions(childS, 2, 1);
24384 ssSetInputPortWidth(childS, 2, 1);
24385 }
24386
24387 /* port 3 */
24388 {
24389 static real32_T const *sfcnUPtrs[1];
24390 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
24391 ssGetLocalBlockIO(rts))->q_k;
24392 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
24393 _ssSetInputPortNumDimensions(childS, 3, 1);
24394 ssSetInputPortWidth(childS, 3, 1);
24395 }
24396
24397 /* port 4 */
24398 {
24399 static real32_T const *sfcnUPtrs[1];
24400 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
24401 ssGetLocalBlockIO(rts))->q_k;
24402 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
24403 _ssSetInputPortNumDimensions(childS, 4, 1);
24404 ssSetInputPortWidth(childS, 4, 1);
24405 }
24406
24407 /* port 5 */
24408 {
24409 static real32_T const *sfcnUPtrs[1];
24410 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
24411 ssGetLocalBlockIO(rts))->q_k;
24412 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
24413 _ssSetInputPortNumDimensions(childS, 5, 1);
24414 ssSetInputPortWidth(childS, 5, 1);
24415 }
24416 }
24417
24418 /* outputs */
24419 {
24420 static struct _ssPortOutputs outputPortInfo[1];
24421 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
24422 _ssSetNumOutputPorts(childS, 1);
24423
24424 /* port 0 */
24425 {
24426 _ssSetOutputPortNumDimensions(childS, 0, 1);
24427 ssSetOutputPortWidth(childS, 0, 1);
24428 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
24429 *) ssGetLocalBlockIO(rts))->GeneratedSFunction8_p));
24430 }
24431 }
24432
24433 /* path info */
24434 _ssSetModelName(childS, "WashoutFilter_sf");
24435 _ssSetPath(childS,
24436 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/CAS/lon/PIDonControl/ high pass filter/Generated S-Function8");
24437 if (ssGetRTModel(rts) == (NULL)) {
24438 _ssSetParentSS(childS, rts);
24439 _ssSetRootSS(childS, ssGetRootSS(rts));
24440 } else {
24441 ssSetRTModel(childS,ssGetRTModel(rts));
24442 _ssSetParentSS(childS, (NULL));
24443 _ssSetRootSS(childS, childS);
24444 }
24445
24446 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
24447
24448 /* work vectors */
24449 {
24450 static struct _ssDWorkRecord dWorkRecord[4];
24451 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
24452 ssSetSFcnDWork(childS, dWorkRecord);
24453 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
24454 _ssSetNumDWork(childS, 4);
24455
24456 /* DWORK0 */
24457 ssSetDWorkWidth(childS, 0, 1);
24458 ssSetDWorkDataType(childS, 0,SS_SINGLE);
24459 ssSetDWorkComplexSignal(childS, 0, 0);
24460 ssSetDWorkUsedAsDState(childS, 0, 1);
24461 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 251))[0]);
24462
24463 /* DWORK1 */
24464 ssSetDWorkWidth(childS, 1, 1);
24465 ssSetDWorkDataType(childS, 1,SS_SINGLE);
24466 ssSetDWorkComplexSignal(childS, 1, 0);
24467 ssSetDWorkUsedAsDState(childS, 1, 1);
24468 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 252))[0]);
24469
24470 /* DWORK2 */
24471 ssSetDWorkWidth(childS, 2, 1);
24472 ssSetDWorkDataType(childS, 2,SS_INT8);
24473 ssSetDWorkComplexSignal(childS, 2, 0);
24474 ssSetDWorkUsedAsDState(childS, 2, 1);
24475 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 481))[0]);
24476
24477 /* DWORK3 */
24478 ssSetDWorkWidth(childS, 3, 1);
24479 ssSetDWorkDataType(childS, 3,SS_INT8);
24480 ssSetDWorkComplexSignal(childS, 3, 0);
24481 ssSetDWorkUsedAsDState(childS, 3, 1);
24482 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 482))[0]);
24483 }
24484
24485 /* registration */
24486 WashoutFilter_sf(childS);
24487 sfcnInitializeSizes(childS);
24488 sfcnInitializeSampleTimes(childS);
24489
24490 /* adjust sample time */
24491 ssSetSampleTime(childS, 0, 0.0);
24492 ssSetOffsetTime(childS, 0, 0.0);
24493 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
24494
24495 /* set compiled values of dynamic vector attributes */
24496 ssSetNumNonsampledZCs(childS, 0);
24497
24498 /* Update connectivity flags for each port */
24499 _ssSetInputPortConnected(childS, 0, 1);
24500 _ssSetInputPortConnected(childS, 1, 1);
24501 _ssSetInputPortConnected(childS, 2, 1);
24502 _ssSetInputPortConnected(childS, 3, 1);
24503 _ssSetInputPortConnected(childS, 4, 1);
24504 _ssSetInputPortConnected(childS, 5, 1);
24505 _ssSetOutputPortConnected(childS, 0, 1);
24506 _ssSetOutputPortBeingMerged(childS, 0, 0);
24507
24508 /* Update the BufferDstPort flags for each input port */
24509 _ssSetInputPortBufferDstPort(childS, 0, -1);
24510 _ssSetInputPortBufferDstPort(childS, 1, -1);
24511 _ssSetInputPortBufferDstPort(childS, 2, -1);
24512 _ssSetInputPortBufferDstPort(childS, 3, -1);
24513 _ssSetInputPortBufferDstPort(childS, 4, -1);
24514 _ssSetInputPortBufferDstPort(childS, 5, -1);
24515
24516 /* Instance data for generated S-Function: WashoutFilter */
24517 {
24518 SimStruct *rts = childS;
24519
24520#include "WashoutFilter_sfcn_rtw/WashoutFilter_sid.h"
24521
24522 }
24523 }
24524
24525 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S253>/Generated S-Function4 (LagFilter_sf) */
24526 {
24527 SimStruct *childS = ssGetSFunction(rts, 137);
24528
24529 /* timing info */
24530 static time_T sfcnPeriod[1];
24531 static time_T sfcnOffset[1];
24532 static int_T sfcnTsMap[1];
24533 (void) memset((void*)sfcnPeriod, 0,
24534 sizeof(time_T)*1);
24535 (void) memset((void*)sfcnOffset, 0,
24536 sizeof(time_T)*1);
24537 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
24538 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
24539 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
24540
24541 /* Set up the mdlInfo pointer */
24542# ifdef USE_RTMODEL
24543
24544 {
24545 static struct _ssBlkInfo2 _blkInfo2;
24546 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
24547 ssSetBlkInfo2Ptr(childS, blkInfo2);
24548 }
24549
24550 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
24551
24552# else
24553
24554 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
24555
24556# endif /* USE_RTMODEL */
24557
24558 /* Allocate memory of model methods 2 */
24559 {
24560 static struct _ssSFcnModelMethods2 methods2;
24561 ssSetModelMethods2(childS, &methods2);
24562 }
24563
24564 /* Allocate memory of model methods 3 */
24565 {
24566 static struct _ssSFcnModelMethods3 methods3;
24567 ssSetModelMethods3(childS, &methods3);
24568 }
24569
24570 /* Allocate memory for states auxilliary information */
24571 {
24572 static struct _ssStatesInfo2 statesInfo2;
24573 static ssPeriodicStatesInfo periodicStatesInfo;
24574 ssSetStatesInfo2(childS, &statesInfo2);
24575 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
24576 }
24577
24578 /* inputs */
24579 {
24580 static struct _ssPortInputs inputPortInfo[6];
24581 _ssSetNumInputPorts(childS, 6);
24582 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
24583
24584 /* port 0 */
24585 {
24586 static real32_T const *sfcnUPtrs[1];
24587 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
24588 ssGetLocalBlockIO(rts))->dtCAS;
24589 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
24590 _ssSetInputPortNumDimensions(childS, 0, 1);
24591 ssSetInputPortWidth(childS, 0, 1);
24592 }
24593
24594 /* port 1 */
24595 {
24596 static int8_T const *sfcnUPtrs[1];
24597 sfcnUPtrs[0] = (int8_T const *) &AFCS_MODEL1_ConstP.pooled143;
24598 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
24599 _ssSetInputPortNumDimensions(childS, 1, 1);
24600 ssSetInputPortWidth(childS, 1, 1);
24601 }
24602
24603 /* port 2 */
24604 {
24605 static real32_T const *sfcnUPtrs[1];
24606 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled114;
24607 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
24608 _ssSetInputPortNumDimensions(childS, 2, 1);
24609 ssSetInputPortWidth(childS, 2, 1);
24610 }
24611
24612 /* port 3 */
24613 {
24614 static real32_T const *sfcnUPtrs[1];
24615 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
24616 ssGetLocalBlockIO(rts))->Sum1_e;
24617 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
24618 _ssSetInputPortNumDimensions(childS, 3, 1);
24619 ssSetInputPortWidth(childS, 3, 1);
24620 }
24621
24622 /* port 4 */
24623 {
24624 static real32_T const *sfcnUPtrs[1];
24625 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
24626 ssGetLocalBlockIO(rts))->Sum1_e;
24627 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
24628 _ssSetInputPortNumDimensions(childS, 4, 1);
24629 ssSetInputPortWidth(childS, 4, 1);
24630 }
24631
24632 /* port 5 */
24633 {
24634 static real32_T const *sfcnUPtrs[1];
24635 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
24636 ssGetLocalBlockIO(rts))->Sum1_e;
24637 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
24638 _ssSetInputPortNumDimensions(childS, 5, 1);
24639 ssSetInputPortWidth(childS, 5, 1);
24640 }
24641 }
24642
24643 /* outputs */
24644 {
24645 static struct _ssPortOutputs outputPortInfo[1];
24646 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
24647 _ssSetNumOutputPorts(childS, 1);
24648
24649 /* port 0 */
24650 {
24651 _ssSetOutputPortNumDimensions(childS, 0, 1);
24652 ssSetOutputPortWidth(childS, 0, 1);
24653 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
24654 *) ssGetLocalBlockIO(rts))->GeneratedSFunction4_e));
24655 }
24656 }
24657
24658 /* path info */
24659 _ssSetModelName(childS, "LagFilter_sf");
24660 _ssSetPath(childS,
24661 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/CAS/lon/PIDonControl/ lag filter/Generated S-Function4");
24662 if (ssGetRTModel(rts) == (NULL)) {
24663 _ssSetParentSS(childS, rts);
24664 _ssSetRootSS(childS, ssGetRootSS(rts));
24665 } else {
24666 ssSetRTModel(childS,ssGetRTModel(rts));
24667 _ssSetParentSS(childS, (NULL));
24668 _ssSetRootSS(childS, childS);
24669 }
24670
24671 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
24672
24673 /* work vectors */
24674 {
24675 static struct _ssDWorkRecord dWorkRecord[4];
24676 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
24677 ssSetSFcnDWork(childS, dWorkRecord);
24678 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
24679 _ssSetNumDWork(childS, 4);
24680
24681 /* DWORK0 */
24682 ssSetDWorkWidth(childS, 0, 1);
24683 ssSetDWorkDataType(childS, 0,SS_SINGLE);
24684 ssSetDWorkComplexSignal(childS, 0, 0);
24685 ssSetDWorkUsedAsDState(childS, 0, 1);
24686 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 253))[0]);
24687
24688 /* DWORK1 */
24689 ssSetDWorkWidth(childS, 1, 1);
24690 ssSetDWorkDataType(childS, 1,SS_SINGLE);
24691 ssSetDWorkComplexSignal(childS, 1, 0);
24692 ssSetDWorkUsedAsDState(childS, 1, 1);
24693 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 254))[0]);
24694
24695 /* DWORK2 */
24696 ssSetDWorkWidth(childS, 2, 1);
24697 ssSetDWorkDataType(childS, 2,SS_INT8);
24698 ssSetDWorkComplexSignal(childS, 2, 0);
24699 ssSetDWorkUsedAsDState(childS, 2, 1);
24700 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 483))[0]);
24701
24702 /* DWORK3 */
24703 ssSetDWorkWidth(childS, 3, 1);
24704 ssSetDWorkDataType(childS, 3,SS_INT8);
24705 ssSetDWorkComplexSignal(childS, 3, 0);
24706 ssSetDWorkUsedAsDState(childS, 3, 1);
24707 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 484))[0]);
24708 }
24709
24710 /* registration */
24711 LagFilter_sf(childS);
24712 sfcnInitializeSizes(childS);
24713 sfcnInitializeSampleTimes(childS);
24714
24715 /* adjust sample time */
24716 ssSetSampleTime(childS, 0, 0.0);
24717 ssSetOffsetTime(childS, 0, 0.0);
24718 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
24719
24720 /* set compiled values of dynamic vector attributes */
24721 ssSetNumNonsampledZCs(childS, 0);
24722
24723 /* Update connectivity flags for each port */
24724 _ssSetInputPortConnected(childS, 0, 1);
24725 _ssSetInputPortConnected(childS, 1, 1);
24726 _ssSetInputPortConnected(childS, 2, 1);
24727 _ssSetInputPortConnected(childS, 3, 1);
24728 _ssSetInputPortConnected(childS, 4, 1);
24729 _ssSetInputPortConnected(childS, 5, 1);
24730 _ssSetOutputPortConnected(childS, 0, 1);
24731 _ssSetOutputPortBeingMerged(childS, 0, 0);
24732
24733 /* Update the BufferDstPort flags for each input port */
24734 _ssSetInputPortBufferDstPort(childS, 0, -1);
24735 _ssSetInputPortBufferDstPort(childS, 1, -1);
24736 _ssSetInputPortBufferDstPort(childS, 2, -1);
24737 _ssSetInputPortBufferDstPort(childS, 3, -1);
24738 _ssSetInputPortBufferDstPort(childS, 4, -1);
24739 _ssSetInputPortBufferDstPort(childS, 5, -1);
24740
24741 /* Instance data for generated S-Function: LagFilter */
24742 {
24743 SimStruct *rts = childS;
24744
24745#include "LagFilter_sfcn_rtw/LagFilter_sid.h"
24746
24747 }
24748 }
24749
24750 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S254>/Generated S-Function4 (LagFilter_sf) */
24751 {
24752 SimStruct *childS = ssGetSFunction(rts, 138);
24753
24754 /* timing info */
24755 static time_T sfcnPeriod[1];
24756 static time_T sfcnOffset[1];
24757 static int_T sfcnTsMap[1];
24758 (void) memset((void*)sfcnPeriod, 0,
24759 sizeof(time_T)*1);
24760 (void) memset((void*)sfcnOffset, 0,
24761 sizeof(time_T)*1);
24762 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
24763 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
24764 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
24765
24766 /* Set up the mdlInfo pointer */
24767# ifdef USE_RTMODEL
24768
24769 {
24770 static struct _ssBlkInfo2 _blkInfo2;
24771 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
24772 ssSetBlkInfo2Ptr(childS, blkInfo2);
24773 }
24774
24775 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
24776
24777# else
24778
24779 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
24780
24781# endif /* USE_RTMODEL */
24782
24783 /* Allocate memory of model methods 2 */
24784 {
24785 static struct _ssSFcnModelMethods2 methods2;
24786 ssSetModelMethods2(childS, &methods2);
24787 }
24788
24789 /* Allocate memory of model methods 3 */
24790 {
24791 static struct _ssSFcnModelMethods3 methods3;
24792 ssSetModelMethods3(childS, &methods3);
24793 }
24794
24795 /* Allocate memory for states auxilliary information */
24796 {
24797 static struct _ssStatesInfo2 statesInfo2;
24798 static ssPeriodicStatesInfo periodicStatesInfo;
24799 ssSetStatesInfo2(childS, &statesInfo2);
24800 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
24801 }
24802
24803 /* inputs */
24804 {
24805 static struct _ssPortInputs inputPortInfo[6];
24806 _ssSetNumInputPorts(childS, 6);
24807 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
24808
24809 /* port 0 */
24810 {
24811 static real32_T const *sfcnUPtrs[1];
24812 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
24813 ssGetLocalBlockIO(rts))->dtCAS;
24814 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
24815 _ssSetInputPortNumDimensions(childS, 0, 1);
24816 ssSetInputPortWidth(childS, 0, 1);
24817 }
24818
24819 /* port 1 */
24820 {
24821 static int8_T const *sfcnUPtrs[1];
24822 sfcnUPtrs[0] = (int8_T const *) &AFCS_MODEL1_ConstP.pooled143;
24823 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
24824 _ssSetInputPortNumDimensions(childS, 1, 1);
24825 ssSetInputPortWidth(childS, 1, 1);
24826 }
24827
24828 /* port 2 */
24829 {
24830 static real32_T const *sfcnUPtrs[1];
24831 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled113;
24832 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
24833 _ssSetInputPortNumDimensions(childS, 2, 1);
24834 ssSetInputPortWidth(childS, 2, 1);
24835 }
24836
24837 /* port 3 */
24838 {
24839 static real32_T const *sfcnUPtrs[1];
24840 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
24841 ssGetLocalBlockIO(rts))->q_k;
24842 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
24843 _ssSetInputPortNumDimensions(childS, 3, 1);
24844 ssSetInputPortWidth(childS, 3, 1);
24845 }
24846
24847 /* port 4 */
24848 {
24849 static real32_T const *sfcnUPtrs[1];
24850 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
24851 ssGetLocalBlockIO(rts))->q_k;
24852 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
24853 _ssSetInputPortNumDimensions(childS, 4, 1);
24854 ssSetInputPortWidth(childS, 4, 1);
24855 }
24856
24857 /* port 5 */
24858 {
24859 static real32_T const *sfcnUPtrs[1];
24860 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
24861 ssGetLocalBlockIO(rts))->q_k;
24862 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
24863 _ssSetInputPortNumDimensions(childS, 5, 1);
24864 ssSetInputPortWidth(childS, 5, 1);
24865 }
24866 }
24867
24868 /* outputs */
24869 {
24870 static struct _ssPortOutputs outputPortInfo[1];
24871 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
24872 _ssSetNumOutputPorts(childS, 1);
24873
24874 /* port 0 */
24875 {
24876 _ssSetOutputPortNumDimensions(childS, 0, 1);
24877 ssSetOutputPortWidth(childS, 0, 1);
24878 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
24879 *) ssGetLocalBlockIO(rts))->GeneratedSFunction4_ms));
24880 }
24881 }
24882
24883 /* path info */
24884 _ssSetModelName(childS, "LagFilter_sf");
24885 _ssSetPath(childS,
24886 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/CAS/lon/PIDonControl/ lag filter1/Generated S-Function4");
24887 if (ssGetRTModel(rts) == (NULL)) {
24888 _ssSetParentSS(childS, rts);
24889 _ssSetRootSS(childS, ssGetRootSS(rts));
24890 } else {
24891 ssSetRTModel(childS,ssGetRTModel(rts));
24892 _ssSetParentSS(childS, (NULL));
24893 _ssSetRootSS(childS, childS);
24894 }
24895
24896 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
24897
24898 /* work vectors */
24899 {
24900 static struct _ssDWorkRecord dWorkRecord[4];
24901 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
24902 ssSetSFcnDWork(childS, dWorkRecord);
24903 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
24904 _ssSetNumDWork(childS, 4);
24905
24906 /* DWORK0 */
24907 ssSetDWorkWidth(childS, 0, 1);
24908 ssSetDWorkDataType(childS, 0,SS_SINGLE);
24909 ssSetDWorkComplexSignal(childS, 0, 0);
24910 ssSetDWorkUsedAsDState(childS, 0, 1);
24911 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 255))[0]);
24912
24913 /* DWORK1 */
24914 ssSetDWorkWidth(childS, 1, 1);
24915 ssSetDWorkDataType(childS, 1,SS_SINGLE);
24916 ssSetDWorkComplexSignal(childS, 1, 0);
24917 ssSetDWorkUsedAsDState(childS, 1, 1);
24918 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 256))[0]);
24919
24920 /* DWORK2 */
24921 ssSetDWorkWidth(childS, 2, 1);
24922 ssSetDWorkDataType(childS, 2,SS_INT8);
24923 ssSetDWorkComplexSignal(childS, 2, 0);
24924 ssSetDWorkUsedAsDState(childS, 2, 1);
24925 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 485))[0]);
24926
24927 /* DWORK3 */
24928 ssSetDWorkWidth(childS, 3, 1);
24929 ssSetDWorkDataType(childS, 3,SS_INT8);
24930 ssSetDWorkComplexSignal(childS, 3, 0);
24931 ssSetDWorkUsedAsDState(childS, 3, 1);
24932 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 486))[0]);
24933 }
24934
24935 /* registration */
24936 LagFilter_sf(childS);
24937 sfcnInitializeSizes(childS);
24938 sfcnInitializeSampleTimes(childS);
24939
24940 /* adjust sample time */
24941 ssSetSampleTime(childS, 0, 0.0);
24942 ssSetOffsetTime(childS, 0, 0.0);
24943 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
24944
24945 /* set compiled values of dynamic vector attributes */
24946 ssSetNumNonsampledZCs(childS, 0);
24947
24948 /* Update connectivity flags for each port */
24949 _ssSetInputPortConnected(childS, 0, 1);
24950 _ssSetInputPortConnected(childS, 1, 1);
24951 _ssSetInputPortConnected(childS, 2, 1);
24952 _ssSetInputPortConnected(childS, 3, 1);
24953 _ssSetInputPortConnected(childS, 4, 1);
24954 _ssSetInputPortConnected(childS, 5, 1);
24955 _ssSetOutputPortConnected(childS, 0, 1);
24956 _ssSetOutputPortBeingMerged(childS, 0, 0);
24957
24958 /* Update the BufferDstPort flags for each input port */
24959 _ssSetInputPortBufferDstPort(childS, 0, -1);
24960 _ssSetInputPortBufferDstPort(childS, 1, -1);
24961 _ssSetInputPortBufferDstPort(childS, 2, -1);
24962 _ssSetInputPortBufferDstPort(childS, 3, -1);
24963 _ssSetInputPortBufferDstPort(childS, 4, -1);
24964 _ssSetInputPortBufferDstPort(childS, 5, -1);
24965
24966 /* Instance data for generated S-Function: LagFilter */
24967 {
24968 SimStruct *rts = childS;
24969
24970#include "LagFilter_sfcn_rtw/LagFilter_sid.h"
24971
24972 }
24973 }
24974
24975 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S259>/Generated S-Function (Gain_sf) */
24976 {
24977 SimStruct *childS = ssGetSFunction(rts, 139);
24978
24979 /* timing info */
24980 static time_T sfcnPeriod[1];
24981 static time_T sfcnOffset[1];
24982 static int_T sfcnTsMap[1];
24983 (void) memset((void*)sfcnPeriod, 0,
24984 sizeof(time_T)*1);
24985 (void) memset((void*)sfcnOffset, 0,
24986 sizeof(time_T)*1);
24987 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
24988 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
24989 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
24990
24991 /* Set up the mdlInfo pointer */
24992# ifdef USE_RTMODEL
24993
24994 {
24995 static struct _ssBlkInfo2 _blkInfo2;
24996 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
24997 ssSetBlkInfo2Ptr(childS, blkInfo2);
24998 }
24999
25000 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
25001
25002# else
25003
25004 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
25005
25006# endif /* USE_RTMODEL */
25007
25008 /* Allocate memory of model methods 2 */
25009 {
25010 static struct _ssSFcnModelMethods2 methods2;
25011 ssSetModelMethods2(childS, &methods2);
25012 }
25013
25014 /* Allocate memory of model methods 3 */
25015 {
25016 static struct _ssSFcnModelMethods3 methods3;
25017 ssSetModelMethods3(childS, &methods3);
25018 }
25019
25020 /* Allocate memory for states auxilliary information */
25021 {
25022 static struct _ssStatesInfo2 statesInfo2;
25023 static ssPeriodicStatesInfo periodicStatesInfo;
25024 ssSetStatesInfo2(childS, &statesInfo2);
25025 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
25026 }
25027
25028 /* inputs */
25029 {
25030 static struct _ssPortInputs inputPortInfo[2];
25031 _ssSetNumInputPorts(childS, 2);
25032 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
25033
25034 /* port 0 */
25035 {
25036 static real32_T const *sfcnUPtrs[1];
25037 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
25038 ssGetLocalBlockIO(rts))->GeneratedSFunction4_e;
25039 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
25040 _ssSetInputPortNumDimensions(childS, 0, 1);
25041 ssSetInputPortWidth(childS, 0, 1);
25042 }
25043
25044 /* port 1 */
25045 {
25046 static real32_T const *sfcnUPtrs[1];
25047 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled105;
25048 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
25049 _ssSetInputPortNumDimensions(childS, 1, 1);
25050 ssSetInputPortWidth(childS, 1, 1);
25051 }
25052 }
25053
25054 /* outputs */
25055 {
25056 static struct _ssPortOutputs outputPortInfo[1];
25057 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
25058 _ssSetNumOutputPorts(childS, 1);
25059
25060 /* port 0 */
25061 {
25062 _ssSetOutputPortNumDimensions(childS, 0, 1);
25063 ssSetOutputPortWidth(childS, 0, 1);
25064 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
25065 *) ssGetLocalBlockIO(rts))->MinMax));
25066 }
25067 }
25068
25069 /* path info */
25070 _ssSetModelName(childS, "Gain_sf");
25071 _ssSetPath(childS,
25072 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/CAS/lon/PIDonControl/gain/Generated S-Function");
25073 if (ssGetRTModel(rts) == (NULL)) {
25074 _ssSetParentSS(childS, rts);
25075 _ssSetRootSS(childS, ssGetRootSS(rts));
25076 } else {
25077 ssSetRTModel(childS,ssGetRTModel(rts));
25078 _ssSetParentSS(childS, (NULL));
25079 _ssSetRootSS(childS, childS);
25080 }
25081
25082 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
25083
25084 /* registration */
25085 Gain_sf(childS);
25086 sfcnInitializeSizes(childS);
25087 sfcnInitializeSampleTimes(childS);
25088
25089 /* adjust sample time */
25090 ssSetSampleTime(childS, 0, 0.0);
25091 ssSetOffsetTime(childS, 0, 0.0);
25092 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
25093
25094 /* set compiled values of dynamic vector attributes */
25095 ssSetNumNonsampledZCs(childS, 0);
25096
25097 /* Update connectivity flags for each port */
25098 _ssSetInputPortConnected(childS, 0, 1);
25099 _ssSetInputPortConnected(childS, 1, 1);
25100 _ssSetOutputPortConnected(childS, 0, 1);
25101 _ssSetOutputPortBeingMerged(childS, 0, 0);
25102
25103 /* Update the BufferDstPort flags for each input port */
25104 _ssSetInputPortBufferDstPort(childS, 0, -1);
25105 _ssSetInputPortBufferDstPort(childS, 1, -1);
25106
25107 /* Instance data for generated S-Function: Gain */
25108 {
25109 SimStruct *rts = childS;
25110
25111#include "Gain_sfcn_rtw/Gain_sid.h"
25112
25113 }
25114 }
25115
25116 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S260>/Generated S-Function (Gain_sf) */
25117 {
25118 SimStruct *childS = ssGetSFunction(rts, 140);
25119
25120 /* timing info */
25121 static time_T sfcnPeriod[1];
25122 static time_T sfcnOffset[1];
25123 static int_T sfcnTsMap[1];
25124 (void) memset((void*)sfcnPeriod, 0,
25125 sizeof(time_T)*1);
25126 (void) memset((void*)sfcnOffset, 0,
25127 sizeof(time_T)*1);
25128 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
25129 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
25130 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
25131
25132 /* Set up the mdlInfo pointer */
25133# ifdef USE_RTMODEL
25134
25135 {
25136 static struct _ssBlkInfo2 _blkInfo2;
25137 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
25138 ssSetBlkInfo2Ptr(childS, blkInfo2);
25139 }
25140
25141 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
25142
25143# else
25144
25145 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
25146
25147# endif /* USE_RTMODEL */
25148
25149 /* Allocate memory of model methods 2 */
25150 {
25151 static struct _ssSFcnModelMethods2 methods2;
25152 ssSetModelMethods2(childS, &methods2);
25153 }
25154
25155 /* Allocate memory of model methods 3 */
25156 {
25157 static struct _ssSFcnModelMethods3 methods3;
25158 ssSetModelMethods3(childS, &methods3);
25159 }
25160
25161 /* Allocate memory for states auxilliary information */
25162 {
25163 static struct _ssStatesInfo2 statesInfo2;
25164 static ssPeriodicStatesInfo periodicStatesInfo;
25165 ssSetStatesInfo2(childS, &statesInfo2);
25166 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
25167 }
25168
25169 /* inputs */
25170 {
25171 static struct _ssPortInputs inputPortInfo[2];
25172 _ssSetNumInputPorts(childS, 2);
25173 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
25174
25175 /* port 0 */
25176 {
25177 static real32_T const *sfcnUPtrs[1];
25178 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
25179 ssGetLocalBlockIO(rts))->GeneratedSFunction4_ms;
25180 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
25181 _ssSetInputPortNumDimensions(childS, 0, 1);
25182 ssSetInputPortWidth(childS, 0, 1);
25183 }
25184
25185 /* port 1 */
25186 {
25187 static real32_T const *sfcnUPtrs[1];
25188 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled123;
25189 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
25190 _ssSetInputPortNumDimensions(childS, 1, 1);
25191 ssSetInputPortWidth(childS, 1, 1);
25192 }
25193 }
25194
25195 /* outputs */
25196 {
25197 static struct _ssPortOutputs outputPortInfo[1];
25198 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
25199 _ssSetNumOutputPorts(childS, 1);
25200
25201 /* port 0 */
25202 {
25203 _ssSetOutputPortNumDimensions(childS, 0, 1);
25204 ssSetOutputPortWidth(childS, 0, 1);
25205 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
25206 *) ssGetLocalBlockIO(rts))->Saturation7));
25207 }
25208 }
25209
25210 /* path info */
25211 _ssSetModelName(childS, "Gain_sf");
25212 _ssSetPath(childS,
25213 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/CAS/lon/PIDonControl/gain1/Generated S-Function");
25214 if (ssGetRTModel(rts) == (NULL)) {
25215 _ssSetParentSS(childS, rts);
25216 _ssSetRootSS(childS, ssGetRootSS(rts));
25217 } else {
25218 ssSetRTModel(childS,ssGetRTModel(rts));
25219 _ssSetParentSS(childS, (NULL));
25220 _ssSetRootSS(childS, childS);
25221 }
25222
25223 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
25224
25225 /* registration */
25226 Gain_sf(childS);
25227 sfcnInitializeSizes(childS);
25228 sfcnInitializeSampleTimes(childS);
25229
25230 /* adjust sample time */
25231 ssSetSampleTime(childS, 0, 0.0);
25232 ssSetOffsetTime(childS, 0, 0.0);
25233 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
25234
25235 /* set compiled values of dynamic vector attributes */
25236 ssSetNumNonsampledZCs(childS, 0);
25237
25238 /* Update connectivity flags for each port */
25239 _ssSetInputPortConnected(childS, 0, 1);
25240 _ssSetInputPortConnected(childS, 1, 1);
25241 _ssSetOutputPortConnected(childS, 0, 1);
25242 _ssSetOutputPortBeingMerged(childS, 0, 0);
25243
25244 /* Update the BufferDstPort flags for each input port */
25245 _ssSetInputPortBufferDstPort(childS, 0, -1);
25246 _ssSetInputPortBufferDstPort(childS, 1, -1);
25247
25248 /* Instance data for generated S-Function: Gain */
25249 {
25250 SimStruct *rts = childS;
25251
25252#include "Gain_sfcn_rtw/Gain_sid.h"
25253
25254 }
25255 }
25256
25257 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S255>/Generated S-Function9 (NegativePass_sf) */
25258 {
25259 SimStruct *childS = ssGetSFunction(rts, 141);
25260
25261 /* timing info */
25262 static time_T sfcnPeriod[1];
25263 static time_T sfcnOffset[1];
25264 static int_T sfcnTsMap[1];
25265 (void) memset((void*)sfcnPeriod, 0,
25266 sizeof(time_T)*1);
25267 (void) memset((void*)sfcnOffset, 0,
25268 sizeof(time_T)*1);
25269 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
25270 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
25271 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
25272
25273 /* Set up the mdlInfo pointer */
25274# ifdef USE_RTMODEL
25275
25276 {
25277 static struct _ssBlkInfo2 _blkInfo2;
25278 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
25279 ssSetBlkInfo2Ptr(childS, blkInfo2);
25280 }
25281
25282 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
25283
25284# else
25285
25286 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
25287
25288# endif /* USE_RTMODEL */
25289
25290 /* Allocate memory of model methods 2 */
25291 {
25292 static struct _ssSFcnModelMethods2 methods2;
25293 ssSetModelMethods2(childS, &methods2);
25294 }
25295
25296 /* Allocate memory of model methods 3 */
25297 {
25298 static struct _ssSFcnModelMethods3 methods3;
25299 ssSetModelMethods3(childS, &methods3);
25300 }
25301
25302 /* Allocate memory for states auxilliary information */
25303 {
25304 static struct _ssStatesInfo2 statesInfo2;
25305 static ssPeriodicStatesInfo periodicStatesInfo;
25306 ssSetStatesInfo2(childS, &statesInfo2);
25307 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
25308 }
25309
25310 /* inputs */
25311 {
25312 static struct _ssPortInputs inputPortInfo[1];
25313 _ssSetNumInputPorts(childS, 1);
25314 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
25315
25316 /* port 0 */
25317 {
25318 static real32_T const *sfcnUPtrs[1];
25319 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
25320 ssGetLocalBlockIO(rts))->Sum2_hd;
25321 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
25322 _ssSetInputPortNumDimensions(childS, 0, 1);
25323 ssSetInputPortWidth(childS, 0, 1);
25324 }
25325 }
25326
25327 /* outputs */
25328 {
25329 static struct _ssPortOutputs outputPortInfo[1];
25330 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
25331 _ssSetNumOutputPorts(childS, 1);
25332
25333 /* port 0 */
25334 {
25335 _ssSetOutputPortNumDimensions(childS, 0, 1);
25336 ssSetOutputPortWidth(childS, 0, 1);
25337 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
25338 *) ssGetLocalBlockIO(rts))->Saturation7));
25339 }
25340 }
25341
25342 /* path info */
25343 _ssSetModelName(childS, "NegativePass_sf");
25344 _ssSetPath(childS,
25345 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/CAS/lon/PIDonControl/ negative pass1/Generated S-Function9");
25346 if (ssGetRTModel(rts) == (NULL)) {
25347 _ssSetParentSS(childS, rts);
25348 _ssSetRootSS(childS, ssGetRootSS(rts));
25349 } else {
25350 ssSetRTModel(childS,ssGetRTModel(rts));
25351 _ssSetParentSS(childS, (NULL));
25352 _ssSetRootSS(childS, childS);
25353 }
25354
25355 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
25356
25357 /* registration */
25358 NegativePass_sf(childS);
25359 sfcnInitializeSizes(childS);
25360 sfcnInitializeSampleTimes(childS);
25361
25362 /* adjust sample time */
25363 ssSetSampleTime(childS, 0, 0.0);
25364 ssSetOffsetTime(childS, 0, 0.0);
25365 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
25366
25367 /* set compiled values of dynamic vector attributes */
25368 ssSetNumNonsampledZCs(childS, 0);
25369
25370 /* Update connectivity flags for each port */
25371 _ssSetInputPortConnected(childS, 0, 1);
25372 _ssSetOutputPortConnected(childS, 0, 1);
25373 _ssSetOutputPortBeingMerged(childS, 0, 0);
25374
25375 /* Update the BufferDstPort flags for each input port */
25376 _ssSetInputPortBufferDstPort(childS, 0, -1);
25377
25378 /* Instance data for generated S-Function: NegativePass */
25379 {
25380 SimStruct *rts = childS;
25381
25382#include "NegativePass_sfcn_rtw/NegativePass_sid.h"
25383
25384 }
25385 }
25386
25387 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S266>/Generated S-Function (WashoutFilter_sf) */
25388 {
25389 SimStruct *childS = ssGetSFunction(rts, 142);
25390
25391 /* timing info */
25392 static time_T sfcnPeriod[1];
25393 static time_T sfcnOffset[1];
25394 static int_T sfcnTsMap[1];
25395 (void) memset((void*)sfcnPeriod, 0,
25396 sizeof(time_T)*1);
25397 (void) memset((void*)sfcnOffset, 0,
25398 sizeof(time_T)*1);
25399 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
25400 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
25401 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
25402
25403 /* Set up the mdlInfo pointer */
25404# ifdef USE_RTMODEL
25405
25406 {
25407 static struct _ssBlkInfo2 _blkInfo2;
25408 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
25409 ssSetBlkInfo2Ptr(childS, blkInfo2);
25410 }
25411
25412 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
25413
25414# else
25415
25416 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
25417
25418# endif /* USE_RTMODEL */
25419
25420 /* Allocate memory of model methods 2 */
25421 {
25422 static struct _ssSFcnModelMethods2 methods2;
25423 ssSetModelMethods2(childS, &methods2);
25424 }
25425
25426 /* Allocate memory of model methods 3 */
25427 {
25428 static struct _ssSFcnModelMethods3 methods3;
25429 ssSetModelMethods3(childS, &methods3);
25430 }
25431
25432 /* Allocate memory for states auxilliary information */
25433 {
25434 static struct _ssStatesInfo2 statesInfo2;
25435 static ssPeriodicStatesInfo periodicStatesInfo;
25436 ssSetStatesInfo2(childS, &statesInfo2);
25437 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
25438 }
25439
25440 /* inputs */
25441 {
25442 static struct _ssPortInputs inputPortInfo[6];
25443 _ssSetNumInputPorts(childS, 6);
25444 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
25445
25446 /* port 0 */
25447 {
25448 static real32_T const *sfcnUPtrs[1];
25449 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
25450 ssGetLocalBlockIO(rts))->dtCAS;
25451 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
25452 _ssSetInputPortNumDimensions(childS, 0, 1);
25453 ssSetInputPortWidth(childS, 0, 1);
25454 }
25455
25456 /* port 1 */
25457 {
25458 static int8_T const *sfcnUPtrs[1];
25459 sfcnUPtrs[0] = (int8_T const *) &AFCS_MODEL1_ConstP.pooled143;
25460 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
25461 _ssSetInputPortNumDimensions(childS, 1, 1);
25462 ssSetInputPortWidth(childS, 1, 1);
25463 }
25464
25465 /* port 2 */
25466 {
25467 static real32_T const *sfcnUPtrs[1];
25468 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled109;
25469 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
25470 _ssSetInputPortNumDimensions(childS, 2, 1);
25471 ssSetInputPortWidth(childS, 2, 1);
25472 }
25473
25474 /* port 3 */
25475 {
25476 static real32_T const *sfcnUPtrs[1];
25477 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
25478 ssGetLocalBlockIO(rts))->Alfa_j;
25479 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
25480 _ssSetInputPortNumDimensions(childS, 3, 1);
25481 ssSetInputPortWidth(childS, 3, 1);
25482 }
25483
25484 /* port 4 */
25485 {
25486 static real32_T const *sfcnUPtrs[1];
25487 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
25488 ssGetLocalBlockIO(rts))->Alfa_j;
25489 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
25490 _ssSetInputPortNumDimensions(childS, 4, 1);
25491 ssSetInputPortWidth(childS, 4, 1);
25492 }
25493
25494 /* port 5 */
25495 {
25496 static real32_T const *sfcnUPtrs[1];
25497 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
25498 ssGetLocalBlockIO(rts))->Alfa_j;
25499 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
25500 _ssSetInputPortNumDimensions(childS, 5, 1);
25501 ssSetInputPortWidth(childS, 5, 1);
25502 }
25503 }
25504
25505 /* outputs */
25506 {
25507 static struct _ssPortOutputs outputPortInfo[1];
25508 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
25509 _ssSetNumOutputPorts(childS, 1);
25510
25511 /* port 0 */
25512 {
25513 _ssSetOutputPortNumDimensions(childS, 0, 1);
25514 ssSetOutputPortWidth(childS, 0, 1);
25515 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
25516 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_f5));
25517 }
25518 }
25519
25520 /* path info */
25521 _ssSetModelName(childS, "WashoutFilter_sf");
25522 _ssSetPath(childS,
25523 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/CAS/lon/PIDonControl/AlfaLim / high pass filter2/Generated S-Function");
25524 if (ssGetRTModel(rts) == (NULL)) {
25525 _ssSetParentSS(childS, rts);
25526 _ssSetRootSS(childS, ssGetRootSS(rts));
25527 } else {
25528 ssSetRTModel(childS,ssGetRTModel(rts));
25529 _ssSetParentSS(childS, (NULL));
25530 _ssSetRootSS(childS, childS);
25531 }
25532
25533 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
25534
25535 /* work vectors */
25536 {
25537 static struct _ssDWorkRecord dWorkRecord[4];
25538 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
25539 ssSetSFcnDWork(childS, dWorkRecord);
25540 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
25541 _ssSetNumDWork(childS, 4);
25542
25543 /* DWORK0 */
25544 ssSetDWorkWidth(childS, 0, 1);
25545 ssSetDWorkDataType(childS, 0,SS_SINGLE);
25546 ssSetDWorkComplexSignal(childS, 0, 0);
25547 ssSetDWorkUsedAsDState(childS, 0, 1);
25548 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 257))[0]);
25549
25550 /* DWORK1 */
25551 ssSetDWorkWidth(childS, 1, 1);
25552 ssSetDWorkDataType(childS, 1,SS_SINGLE);
25553 ssSetDWorkComplexSignal(childS, 1, 0);
25554 ssSetDWorkUsedAsDState(childS, 1, 1);
25555 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 258))[0]);
25556
25557 /* DWORK2 */
25558 ssSetDWorkWidth(childS, 2, 1);
25559 ssSetDWorkDataType(childS, 2,SS_INT8);
25560 ssSetDWorkComplexSignal(childS, 2, 0);
25561 ssSetDWorkUsedAsDState(childS, 2, 1);
25562 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 487))[0]);
25563
25564 /* DWORK3 */
25565 ssSetDWorkWidth(childS, 3, 1);
25566 ssSetDWorkDataType(childS, 3,SS_INT8);
25567 ssSetDWorkComplexSignal(childS, 3, 0);
25568 ssSetDWorkUsedAsDState(childS, 3, 1);
25569 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 488))[0]);
25570 }
25571
25572 /* registration */
25573 WashoutFilter_sf(childS);
25574 sfcnInitializeSizes(childS);
25575 sfcnInitializeSampleTimes(childS);
25576
25577 /* adjust sample time */
25578 ssSetSampleTime(childS, 0, 0.0);
25579 ssSetOffsetTime(childS, 0, 0.0);
25580 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
25581
25582 /* set compiled values of dynamic vector attributes */
25583 ssSetNumNonsampledZCs(childS, 0);
25584
25585 /* Update connectivity flags for each port */
25586 _ssSetInputPortConnected(childS, 0, 1);
25587 _ssSetInputPortConnected(childS, 1, 1);
25588 _ssSetInputPortConnected(childS, 2, 1);
25589 _ssSetInputPortConnected(childS, 3, 1);
25590 _ssSetInputPortConnected(childS, 4, 1);
25591 _ssSetInputPortConnected(childS, 5, 1);
25592 _ssSetOutputPortConnected(childS, 0, 1);
25593 _ssSetOutputPortBeingMerged(childS, 0, 0);
25594
25595 /* Update the BufferDstPort flags for each input port */
25596 _ssSetInputPortBufferDstPort(childS, 0, -1);
25597 _ssSetInputPortBufferDstPort(childS, 1, -1);
25598 _ssSetInputPortBufferDstPort(childS, 2, -1);
25599 _ssSetInputPortBufferDstPort(childS, 3, -1);
25600 _ssSetInputPortBufferDstPort(childS, 4, -1);
25601 _ssSetInputPortBufferDstPort(childS, 5, -1);
25602
25603 /* Instance data for generated S-Function: WashoutFilter */
25604 {
25605 SimStruct *rts = childS;
25606
25607#include "WashoutFilter_sfcn_rtw/WashoutFilter_sid.h"
25608
25609 }
25610 }
25611
25612 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S268>/Generated S-Function (Gain_sf) */
25613 {
25614 SimStruct *childS = ssGetSFunction(rts, 143);
25615
25616 /* timing info */
25617 static time_T sfcnPeriod[1];
25618 static time_T sfcnOffset[1];
25619 static int_T sfcnTsMap[1];
25620 (void) memset((void*)sfcnPeriod, 0,
25621 sizeof(time_T)*1);
25622 (void) memset((void*)sfcnOffset, 0,
25623 sizeof(time_T)*1);
25624 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
25625 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
25626 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
25627
25628 /* Set up the mdlInfo pointer */
25629# ifdef USE_RTMODEL
25630
25631 {
25632 static struct _ssBlkInfo2 _blkInfo2;
25633 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
25634 ssSetBlkInfo2Ptr(childS, blkInfo2);
25635 }
25636
25637 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
25638
25639# else
25640
25641 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
25642
25643# endif /* USE_RTMODEL */
25644
25645 /* Allocate memory of model methods 2 */
25646 {
25647 static struct _ssSFcnModelMethods2 methods2;
25648 ssSetModelMethods2(childS, &methods2);
25649 }
25650
25651 /* Allocate memory of model methods 3 */
25652 {
25653 static struct _ssSFcnModelMethods3 methods3;
25654 ssSetModelMethods3(childS, &methods3);
25655 }
25656
25657 /* Allocate memory for states auxilliary information */
25658 {
25659 static struct _ssStatesInfo2 statesInfo2;
25660 static ssPeriodicStatesInfo periodicStatesInfo;
25661 ssSetStatesInfo2(childS, &statesInfo2);
25662 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
25663 }
25664
25665 /* inputs */
25666 {
25667 static struct _ssPortInputs inputPortInfo[2];
25668 _ssSetNumInputPorts(childS, 2);
25669 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
25670
25671 /* port 0 */
25672 {
25673 static real32_T const *sfcnUPtrs[1];
25674 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
25675 ssGetLocalBlockIO(rts))->GeneratedSFunction_f5;
25676 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
25677 _ssSetInputPortNumDimensions(childS, 0, 1);
25678 ssSetInputPortWidth(childS, 0, 1);
25679 }
25680
25681 /* port 1 */
25682 {
25683 static real32_T const *sfcnUPtrs[1];
25684 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled132;
25685 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
25686 _ssSetInputPortNumDimensions(childS, 1, 1);
25687 ssSetInputPortWidth(childS, 1, 1);
25688 }
25689 }
25690
25691 /* outputs */
25692 {
25693 static struct _ssPortOutputs outputPortInfo[1];
25694 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
25695 _ssSetNumOutputPorts(childS, 1);
25696
25697 /* port 0 */
25698 {
25699 _ssSetOutputPortNumDimensions(childS, 0, 1);
25700 ssSetOutputPortWidth(childS, 0, 1);
25701 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
25702 *) ssGetLocalBlockIO(rts))->MinMax));
25703 }
25704 }
25705
25706 /* path info */
25707 _ssSetModelName(childS, "Gain_sf");
25708 _ssSetPath(childS,
25709 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/CAS/lon/PIDonControl/AlfaLim /gain1/Generated S-Function");
25710 if (ssGetRTModel(rts) == (NULL)) {
25711 _ssSetParentSS(childS, rts);
25712 _ssSetRootSS(childS, ssGetRootSS(rts));
25713 } else {
25714 ssSetRTModel(childS,ssGetRTModel(rts));
25715 _ssSetParentSS(childS, (NULL));
25716 _ssSetRootSS(childS, childS);
25717 }
25718
25719 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
25720
25721 /* registration */
25722 Gain_sf(childS);
25723 sfcnInitializeSizes(childS);
25724 sfcnInitializeSampleTimes(childS);
25725
25726 /* adjust sample time */
25727 ssSetSampleTime(childS, 0, 0.0);
25728 ssSetOffsetTime(childS, 0, 0.0);
25729 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
25730
25731 /* set compiled values of dynamic vector attributes */
25732 ssSetNumNonsampledZCs(childS, 0);
25733
25734 /* Update connectivity flags for each port */
25735 _ssSetInputPortConnected(childS, 0, 1);
25736 _ssSetInputPortConnected(childS, 1, 1);
25737 _ssSetOutputPortConnected(childS, 0, 1);
25738 _ssSetOutputPortBeingMerged(childS, 0, 0);
25739
25740 /* Update the BufferDstPort flags for each input port */
25741 _ssSetInputPortBufferDstPort(childS, 0, -1);
25742 _ssSetInputPortBufferDstPort(childS, 1, -1);
25743
25744 /* Instance data for generated S-Function: Gain */
25745 {
25746 SimStruct *rts = childS;
25747
25748#include "Gain_sfcn_rtw/Gain_sid.h"
25749
25750 }
25751 }
25752
25753 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S265>/Generated S-Function8 (WashoutFilter_sf) */
25754 {
25755 SimStruct *childS = ssGetSFunction(rts, 144);
25756
25757 /* timing info */
25758 static time_T sfcnPeriod[1];
25759 static time_T sfcnOffset[1];
25760 static int_T sfcnTsMap[1];
25761 (void) memset((void*)sfcnPeriod, 0,
25762 sizeof(time_T)*1);
25763 (void) memset((void*)sfcnOffset, 0,
25764 sizeof(time_T)*1);
25765 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
25766 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
25767 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
25768
25769 /* Set up the mdlInfo pointer */
25770# ifdef USE_RTMODEL
25771
25772 {
25773 static struct _ssBlkInfo2 _blkInfo2;
25774 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
25775 ssSetBlkInfo2Ptr(childS, blkInfo2);
25776 }
25777
25778 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
25779
25780# else
25781
25782 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
25783
25784# endif /* USE_RTMODEL */
25785
25786 /* Allocate memory of model methods 2 */
25787 {
25788 static struct _ssSFcnModelMethods2 methods2;
25789 ssSetModelMethods2(childS, &methods2);
25790 }
25791
25792 /* Allocate memory of model methods 3 */
25793 {
25794 static struct _ssSFcnModelMethods3 methods3;
25795 ssSetModelMethods3(childS, &methods3);
25796 }
25797
25798 /* Allocate memory for states auxilliary information */
25799 {
25800 static struct _ssStatesInfo2 statesInfo2;
25801 static ssPeriodicStatesInfo periodicStatesInfo;
25802 ssSetStatesInfo2(childS, &statesInfo2);
25803 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
25804 }
25805
25806 /* inputs */
25807 {
25808 static struct _ssPortInputs inputPortInfo[6];
25809 _ssSetNumInputPorts(childS, 6);
25810 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
25811
25812 /* port 0 */
25813 {
25814 static real32_T const *sfcnUPtrs[1];
25815 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
25816 ssGetLocalBlockIO(rts))->dtCAS;
25817 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
25818 _ssSetInputPortNumDimensions(childS, 0, 1);
25819 ssSetInputPortWidth(childS, 0, 1);
25820 }
25821
25822 /* port 1 */
25823 {
25824 static int8_T const *sfcnUPtrs[1];
25825 sfcnUPtrs[0] = (int8_T const *) &AFCS_MODEL1_ConstP.pooled143;
25826 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
25827 _ssSetInputPortNumDimensions(childS, 1, 1);
25828 ssSetInputPortWidth(childS, 1, 1);
25829 }
25830
25831 /* port 2 */
25832 {
25833 static real32_T const *sfcnUPtrs[1];
25834 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled132;
25835 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
25836 _ssSetInputPortNumDimensions(childS, 2, 1);
25837 ssSetInputPortWidth(childS, 2, 1);
25838 }
25839
25840 /* port 3 */
25841 {
25842 static real32_T const *sfcnUPtrs[1];
25843 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
25844 ssGetLocalBlockIO(rts))->q_k;
25845 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
25846 _ssSetInputPortNumDimensions(childS, 3, 1);
25847 ssSetInputPortWidth(childS, 3, 1);
25848 }
25849
25850 /* port 4 */
25851 {
25852 static real32_T const *sfcnUPtrs[1];
25853 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
25854 ssGetLocalBlockIO(rts))->q_k;
25855 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
25856 _ssSetInputPortNumDimensions(childS, 4, 1);
25857 ssSetInputPortWidth(childS, 4, 1);
25858 }
25859
25860 /* port 5 */
25861 {
25862 static real32_T const *sfcnUPtrs[1];
25863 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
25864 ssGetLocalBlockIO(rts))->q_k;
25865 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
25866 _ssSetInputPortNumDimensions(childS, 5, 1);
25867 ssSetInputPortWidth(childS, 5, 1);
25868 }
25869 }
25870
25871 /* outputs */
25872 {
25873 static struct _ssPortOutputs outputPortInfo[1];
25874 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
25875 _ssSetNumOutputPorts(childS, 1);
25876
25877 /* port 0 */
25878 {
25879 _ssSetOutputPortNumDimensions(childS, 0, 1);
25880 ssSetOutputPortWidth(childS, 0, 1);
25881 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
25882 *) ssGetLocalBlockIO(rts))->GeneratedSFunction8_e));
25883 }
25884 }
25885
25886 /* path info */
25887 _ssSetModelName(childS, "WashoutFilter_sf");
25888 _ssSetPath(childS,
25889 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/CAS/lon/PIDonControl/AlfaLim / high pass filter1/Generated S-Function8");
25890 if (ssGetRTModel(rts) == (NULL)) {
25891 _ssSetParentSS(childS, rts);
25892 _ssSetRootSS(childS, ssGetRootSS(rts));
25893 } else {
25894 ssSetRTModel(childS,ssGetRTModel(rts));
25895 _ssSetParentSS(childS, (NULL));
25896 _ssSetRootSS(childS, childS);
25897 }
25898
25899 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
25900
25901 /* work vectors */
25902 {
25903 static struct _ssDWorkRecord dWorkRecord[4];
25904 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
25905 ssSetSFcnDWork(childS, dWorkRecord);
25906 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
25907 _ssSetNumDWork(childS, 4);
25908
25909 /* DWORK0 */
25910 ssSetDWorkWidth(childS, 0, 1);
25911 ssSetDWorkDataType(childS, 0,SS_SINGLE);
25912 ssSetDWorkComplexSignal(childS, 0, 0);
25913 ssSetDWorkUsedAsDState(childS, 0, 1);
25914 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 259))[0]);
25915
25916 /* DWORK1 */
25917 ssSetDWorkWidth(childS, 1, 1);
25918 ssSetDWorkDataType(childS, 1,SS_SINGLE);
25919 ssSetDWorkComplexSignal(childS, 1, 0);
25920 ssSetDWorkUsedAsDState(childS, 1, 1);
25921 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 260))[0]);
25922
25923 /* DWORK2 */
25924 ssSetDWorkWidth(childS, 2, 1);
25925 ssSetDWorkDataType(childS, 2,SS_INT8);
25926 ssSetDWorkComplexSignal(childS, 2, 0);
25927 ssSetDWorkUsedAsDState(childS, 2, 1);
25928 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 489))[0]);
25929
25930 /* DWORK3 */
25931 ssSetDWorkWidth(childS, 3, 1);
25932 ssSetDWorkDataType(childS, 3,SS_INT8);
25933 ssSetDWorkComplexSignal(childS, 3, 0);
25934 ssSetDWorkUsedAsDState(childS, 3, 1);
25935 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 490))[0]);
25936 }
25937
25938 /* registration */
25939 WashoutFilter_sf(childS);
25940 sfcnInitializeSizes(childS);
25941 sfcnInitializeSampleTimes(childS);
25942
25943 /* adjust sample time */
25944 ssSetSampleTime(childS, 0, 0.0);
25945 ssSetOffsetTime(childS, 0, 0.0);
25946 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
25947
25948 /* set compiled values of dynamic vector attributes */
25949 ssSetNumNonsampledZCs(childS, 0);
25950
25951 /* Update connectivity flags for each port */
25952 _ssSetInputPortConnected(childS, 0, 1);
25953 _ssSetInputPortConnected(childS, 1, 1);
25954 _ssSetInputPortConnected(childS, 2, 1);
25955 _ssSetInputPortConnected(childS, 3, 1);
25956 _ssSetInputPortConnected(childS, 4, 1);
25957 _ssSetInputPortConnected(childS, 5, 1);
25958 _ssSetOutputPortConnected(childS, 0, 1);
25959 _ssSetOutputPortBeingMerged(childS, 0, 0);
25960
25961 /* Update the BufferDstPort flags for each input port */
25962 _ssSetInputPortBufferDstPort(childS, 0, -1);
25963 _ssSetInputPortBufferDstPort(childS, 1, -1);
25964 _ssSetInputPortBufferDstPort(childS, 2, -1);
25965 _ssSetInputPortBufferDstPort(childS, 3, -1);
25966 _ssSetInputPortBufferDstPort(childS, 4, -1);
25967 _ssSetInputPortBufferDstPort(childS, 5, -1);
25968
25969 /* Instance data for generated S-Function: WashoutFilter */
25970 {
25971 SimStruct *rts = childS;
25972
25973#include "WashoutFilter_sfcn_rtw/WashoutFilter_sid.h"
25974
25975 }
25976 }
25977
25978 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S269>/Generated S-Function (Gain_sf) */
25979 {
25980 SimStruct *childS = ssGetSFunction(rts, 145);
25981
25982 /* timing info */
25983 static time_T sfcnPeriod[1];
25984 static time_T sfcnOffset[1];
25985 static int_T sfcnTsMap[1];
25986 (void) memset((void*)sfcnPeriod, 0,
25987 sizeof(time_T)*1);
25988 (void) memset((void*)sfcnOffset, 0,
25989 sizeof(time_T)*1);
25990 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
25991 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
25992 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
25993
25994 /* Set up the mdlInfo pointer */
25995# ifdef USE_RTMODEL
25996
25997 {
25998 static struct _ssBlkInfo2 _blkInfo2;
25999 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
26000 ssSetBlkInfo2Ptr(childS, blkInfo2);
26001 }
26002
26003 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
26004
26005# else
26006
26007 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
26008
26009# endif /* USE_RTMODEL */
26010
26011 /* Allocate memory of model methods 2 */
26012 {
26013 static struct _ssSFcnModelMethods2 methods2;
26014 ssSetModelMethods2(childS, &methods2);
26015 }
26016
26017 /* Allocate memory of model methods 3 */
26018 {
26019 static struct _ssSFcnModelMethods3 methods3;
26020 ssSetModelMethods3(childS, &methods3);
26021 }
26022
26023 /* Allocate memory for states auxilliary information */
26024 {
26025 static struct _ssStatesInfo2 statesInfo2;
26026 static ssPeriodicStatesInfo periodicStatesInfo;
26027 ssSetStatesInfo2(childS, &statesInfo2);
26028 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
26029 }
26030
26031 /* inputs */
26032 {
26033 static struct _ssPortInputs inputPortInfo[2];
26034 _ssSetNumInputPorts(childS, 2);
26035 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
26036
26037 /* port 0 */
26038 {
26039 static real32_T const *sfcnUPtrs[1];
26040 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
26041 ssGetLocalBlockIO(rts))->GeneratedSFunction8_e;
26042 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
26043 _ssSetInputPortNumDimensions(childS, 0, 1);
26044 ssSetInputPortWidth(childS, 0, 1);
26045 }
26046
26047 /* port 1 */
26048 {
26049 static real32_T const *sfcnUPtrs[1];
26050 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled133;
26051 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
26052 _ssSetInputPortNumDimensions(childS, 1, 1);
26053 ssSetInputPortWidth(childS, 1, 1);
26054 }
26055 }
26056
26057 /* outputs */
26058 {
26059 static struct _ssPortOutputs outputPortInfo[1];
26060 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
26061 _ssSetNumOutputPorts(childS, 1);
26062
26063 /* port 0 */
26064 {
26065 _ssSetOutputPortNumDimensions(childS, 0, 1);
26066 ssSetOutputPortWidth(childS, 0, 1);
26067 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
26068 *) ssGetLocalBlockIO(rts))->GeneratedSFunction7_o1));
26069 }
26070 }
26071
26072 /* path info */
26073 _ssSetModelName(childS, "Gain_sf");
26074 _ssSetPath(childS,
26075 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/CAS/lon/PIDonControl/AlfaLim /gain10/Generated S-Function");
26076 if (ssGetRTModel(rts) == (NULL)) {
26077 _ssSetParentSS(childS, rts);
26078 _ssSetRootSS(childS, ssGetRootSS(rts));
26079 } else {
26080 ssSetRTModel(childS,ssGetRTModel(rts));
26081 _ssSetParentSS(childS, (NULL));
26082 _ssSetRootSS(childS, childS);
26083 }
26084
26085 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
26086
26087 /* registration */
26088 Gain_sf(childS);
26089 sfcnInitializeSizes(childS);
26090 sfcnInitializeSampleTimes(childS);
26091
26092 /* adjust sample time */
26093 ssSetSampleTime(childS, 0, 0.0);
26094 ssSetOffsetTime(childS, 0, 0.0);
26095 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
26096
26097 /* set compiled values of dynamic vector attributes */
26098 ssSetNumNonsampledZCs(childS, 0);
26099
26100 /* Update connectivity flags for each port */
26101 _ssSetInputPortConnected(childS, 0, 1);
26102 _ssSetInputPortConnected(childS, 1, 1);
26103 _ssSetOutputPortConnected(childS, 0, 1);
26104 _ssSetOutputPortBeingMerged(childS, 0, 0);
26105
26106 /* Update the BufferDstPort flags for each input port */
26107 _ssSetInputPortBufferDstPort(childS, 0, -1);
26108 _ssSetInputPortBufferDstPort(childS, 1, -1);
26109
26110 /* Instance data for generated S-Function: Gain */
26111 {
26112 SimStruct *rts = childS;
26113
26114#include "Gain_sfcn_rtw/Gain_sid.h"
26115
26116 }
26117 }
26118
26119 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S267>/Generated S-Function (NegativePass_sf) */
26120 {
26121 SimStruct *childS = ssGetSFunction(rts, 146);
26122
26123 /* timing info */
26124 static time_T sfcnPeriod[1];
26125 static time_T sfcnOffset[1];
26126 static int_T sfcnTsMap[1];
26127 (void) memset((void*)sfcnPeriod, 0,
26128 sizeof(time_T)*1);
26129 (void) memset((void*)sfcnOffset, 0,
26130 sizeof(time_T)*1);
26131 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
26132 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
26133 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
26134
26135 /* Set up the mdlInfo pointer */
26136# ifdef USE_RTMODEL
26137
26138 {
26139 static struct _ssBlkInfo2 _blkInfo2;
26140 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
26141 ssSetBlkInfo2Ptr(childS, blkInfo2);
26142 }
26143
26144 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
26145
26146# else
26147
26148 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
26149
26150# endif /* USE_RTMODEL */
26151
26152 /* Allocate memory of model methods 2 */
26153 {
26154 static struct _ssSFcnModelMethods2 methods2;
26155 ssSetModelMethods2(childS, &methods2);
26156 }
26157
26158 /* Allocate memory of model methods 3 */
26159 {
26160 static struct _ssSFcnModelMethods3 methods3;
26161 ssSetModelMethods3(childS, &methods3);
26162 }
26163
26164 /* Allocate memory for states auxilliary information */
26165 {
26166 static struct _ssStatesInfo2 statesInfo2;
26167 static ssPeriodicStatesInfo periodicStatesInfo;
26168 ssSetStatesInfo2(childS, &statesInfo2);
26169 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
26170 }
26171
26172 /* inputs */
26173 {
26174 static struct _ssPortInputs inputPortInfo[1];
26175 _ssSetNumInputPorts(childS, 1);
26176 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
26177
26178 /* port 0 */
26179 {
26180 static real32_T const *sfcnUPtrs[1];
26181 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
26182 ssGetLocalBlockIO(rts))->Sum12;
26183 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
26184 _ssSetInputPortNumDimensions(childS, 0, 1);
26185 ssSetInputPortWidth(childS, 0, 1);
26186 }
26187 }
26188
26189 /* outputs */
26190 {
26191 static struct _ssPortOutputs outputPortInfo[1];
26192 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
26193 _ssSetNumOutputPorts(childS, 1);
26194
26195 /* port 0 */
26196 {
26197 _ssSetOutputPortNumDimensions(childS, 0, 1);
26198 ssSetOutputPortWidth(childS, 0, 1);
26199 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
26200 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_hl));
26201 }
26202 }
26203
26204 /* path info */
26205 _ssSetModelName(childS, "NegativePass_sf");
26206 _ssSetPath(childS,
26207 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/CAS/lon/PIDonControl/AlfaLim / negative pass1/Generated S-Function");
26208 if (ssGetRTModel(rts) == (NULL)) {
26209 _ssSetParentSS(childS, rts);
26210 _ssSetRootSS(childS, ssGetRootSS(rts));
26211 } else {
26212 ssSetRTModel(childS,ssGetRTModel(rts));
26213 _ssSetParentSS(childS, (NULL));
26214 _ssSetRootSS(childS, childS);
26215 }
26216
26217 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
26218
26219 /* registration */
26220 NegativePass_sf(childS);
26221 sfcnInitializeSizes(childS);
26222 sfcnInitializeSampleTimes(childS);
26223
26224 /* adjust sample time */
26225 ssSetSampleTime(childS, 0, 0.0);
26226 ssSetOffsetTime(childS, 0, 0.0);
26227 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
26228
26229 /* set compiled values of dynamic vector attributes */
26230 ssSetNumNonsampledZCs(childS, 0);
26231
26232 /* Update connectivity flags for each port */
26233 _ssSetInputPortConnected(childS, 0, 1);
26234 _ssSetOutputPortConnected(childS, 0, 1);
26235 _ssSetOutputPortBeingMerged(childS, 0, 0);
26236
26237 /* Update the BufferDstPort flags for each input port */
26238 _ssSetInputPortBufferDstPort(childS, 0, -1);
26239
26240 /* Instance data for generated S-Function: NegativePass */
26241 {
26242 SimStruct *rts = childS;
26243
26244#include "NegativePass_sfcn_rtw/NegativePass_sid.h"
26245
26246 }
26247 }
26248
26249 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S270>/Generated S-Function (Gain_sf) */
26250 {
26251 SimStruct *childS = ssGetSFunction(rts, 147);
26252
26253 /* timing info */
26254 static time_T sfcnPeriod[1];
26255 static time_T sfcnOffset[1];
26256 static int_T sfcnTsMap[1];
26257 (void) memset((void*)sfcnPeriod, 0,
26258 sizeof(time_T)*1);
26259 (void) memset((void*)sfcnOffset, 0,
26260 sizeof(time_T)*1);
26261 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
26262 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
26263 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
26264
26265 /* Set up the mdlInfo pointer */
26266# ifdef USE_RTMODEL
26267
26268 {
26269 static struct _ssBlkInfo2 _blkInfo2;
26270 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
26271 ssSetBlkInfo2Ptr(childS, blkInfo2);
26272 }
26273
26274 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
26275
26276# else
26277
26278 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
26279
26280# endif /* USE_RTMODEL */
26281
26282 /* Allocate memory of model methods 2 */
26283 {
26284 static struct _ssSFcnModelMethods2 methods2;
26285 ssSetModelMethods2(childS, &methods2);
26286 }
26287
26288 /* Allocate memory of model methods 3 */
26289 {
26290 static struct _ssSFcnModelMethods3 methods3;
26291 ssSetModelMethods3(childS, &methods3);
26292 }
26293
26294 /* Allocate memory for states auxilliary information */
26295 {
26296 static struct _ssStatesInfo2 statesInfo2;
26297 static ssPeriodicStatesInfo periodicStatesInfo;
26298 ssSetStatesInfo2(childS, &statesInfo2);
26299 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
26300 }
26301
26302 /* inputs */
26303 {
26304 static struct _ssPortInputs inputPortInfo[2];
26305 _ssSetNumInputPorts(childS, 2);
26306 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
26307
26308 /* port 0 */
26309 {
26310 static real32_T const *sfcnUPtrs[1];
26311 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
26312 ssGetLocalBlockIO(rts))->GeneratedSFunction_hl;
26313 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
26314 _ssSetInputPortNumDimensions(childS, 0, 1);
26315 ssSetInputPortWidth(childS, 0, 1);
26316 }
26317
26318 /* port 1 */
26319 {
26320 static real32_T const *sfcnUPtrs[1];
26321 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled132;
26322 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
26323 _ssSetInputPortNumDimensions(childS, 1, 1);
26324 ssSetInputPortWidth(childS, 1, 1);
26325 }
26326 }
26327
26328 /* outputs */
26329 {
26330 static struct _ssPortOutputs outputPortInfo[1];
26331 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
26332 _ssSetNumOutputPorts(childS, 1);
26333
26334 /* port 0 */
26335 {
26336 _ssSetOutputPortNumDimensions(childS, 0, 1);
26337 ssSetOutputPortWidth(childS, 0, 1);
26338 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
26339 *) ssGetLocalBlockIO(rts))->GeneratedSFunction7_o1));
26340 }
26341 }
26342
26343 /* path info */
26344 _ssSetModelName(childS, "Gain_sf");
26345 _ssSetPath(childS,
26346 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/CAS/lon/PIDonControl/AlfaLim /gain11/Generated S-Function");
26347 if (ssGetRTModel(rts) == (NULL)) {
26348 _ssSetParentSS(childS, rts);
26349 _ssSetRootSS(childS, ssGetRootSS(rts));
26350 } else {
26351 ssSetRTModel(childS,ssGetRTModel(rts));
26352 _ssSetParentSS(childS, (NULL));
26353 _ssSetRootSS(childS, childS);
26354 }
26355
26356 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
26357
26358 /* registration */
26359 Gain_sf(childS);
26360 sfcnInitializeSizes(childS);
26361 sfcnInitializeSampleTimes(childS);
26362
26363 /* adjust sample time */
26364 ssSetSampleTime(childS, 0, 0.0);
26365 ssSetOffsetTime(childS, 0, 0.0);
26366 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
26367
26368 /* set compiled values of dynamic vector attributes */
26369 ssSetNumNonsampledZCs(childS, 0);
26370
26371 /* Update connectivity flags for each port */
26372 _ssSetInputPortConnected(childS, 0, 1);
26373 _ssSetInputPortConnected(childS, 1, 1);
26374 _ssSetOutputPortConnected(childS, 0, 1);
26375 _ssSetOutputPortBeingMerged(childS, 0, 0);
26376
26377 /* Update the BufferDstPort flags for each input port */
26378 _ssSetInputPortBufferDstPort(childS, 0, -1);
26379 _ssSetInputPortBufferDstPort(childS, 1, -1);
26380
26381 /* Instance data for generated S-Function: Gain */
26382 {
26383 SimStruct *rts = childS;
26384
26385#include "Gain_sfcn_rtw/Gain_sid.h"
26386
26387 }
26388 }
26389
26390 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S272>/Generated S-Function (PositivePass_sf) */
26391 {
26392 SimStruct *childS = ssGetSFunction(rts, 148);
26393
26394 /* timing info */
26395 static time_T sfcnPeriod[1];
26396 static time_T sfcnOffset[1];
26397 static int_T sfcnTsMap[1];
26398 (void) memset((void*)sfcnPeriod, 0,
26399 sizeof(time_T)*1);
26400 (void) memset((void*)sfcnOffset, 0,
26401 sizeof(time_T)*1);
26402 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
26403 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
26404 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
26405
26406 /* Set up the mdlInfo pointer */
26407# ifdef USE_RTMODEL
26408
26409 {
26410 static struct _ssBlkInfo2 _blkInfo2;
26411 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
26412 ssSetBlkInfo2Ptr(childS, blkInfo2);
26413 }
26414
26415 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
26416
26417# else
26418
26419 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
26420
26421# endif /* USE_RTMODEL */
26422
26423 /* Allocate memory of model methods 2 */
26424 {
26425 static struct _ssSFcnModelMethods2 methods2;
26426 ssSetModelMethods2(childS, &methods2);
26427 }
26428
26429 /* Allocate memory of model methods 3 */
26430 {
26431 static struct _ssSFcnModelMethods3 methods3;
26432 ssSetModelMethods3(childS, &methods3);
26433 }
26434
26435 /* Allocate memory for states auxilliary information */
26436 {
26437 static struct _ssStatesInfo2 statesInfo2;
26438 static ssPeriodicStatesInfo periodicStatesInfo;
26439 ssSetStatesInfo2(childS, &statesInfo2);
26440 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
26441 }
26442
26443 /* inputs */
26444 {
26445 static struct _ssPortInputs inputPortInfo[1];
26446 _ssSetNumInputPorts(childS, 1);
26447 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
26448
26449 /* port 0 */
26450 {
26451 static real32_T const *sfcnUPtrs[1];
26452 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
26453 ssGetLocalBlockIO(rts))->Sum2_n;
26454 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
26455 _ssSetInputPortNumDimensions(childS, 0, 1);
26456 ssSetInputPortWidth(childS, 0, 1);
26457 }
26458 }
26459
26460 /* outputs */
26461 {
26462 static struct _ssPortOutputs outputPortInfo[1];
26463 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
26464 _ssSetNumOutputPorts(childS, 1);
26465
26466 /* port 0 */
26467 {
26468 _ssSetOutputPortNumDimensions(childS, 0, 1);
26469 ssSetOutputPortWidth(childS, 0, 1);
26470 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
26471 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_m5));
26472 }
26473 }
26474
26475 /* path info */
26476 _ssSetModelName(childS, "PositivePass_sf");
26477 _ssSetPath(childS,
26478 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/CAS/lon/PIDonControl/AlfaLim /positive pass1/Generated S-Function");
26479 if (ssGetRTModel(rts) == (NULL)) {
26480 _ssSetParentSS(childS, rts);
26481 _ssSetRootSS(childS, ssGetRootSS(rts));
26482 } else {
26483 ssSetRTModel(childS,ssGetRTModel(rts));
26484 _ssSetParentSS(childS, (NULL));
26485 _ssSetRootSS(childS, childS);
26486 }
26487
26488 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
26489
26490 /* registration */
26491 PositivePass_sf(childS);
26492 sfcnInitializeSizes(childS);
26493 sfcnInitializeSampleTimes(childS);
26494
26495 /* adjust sample time */
26496 ssSetSampleTime(childS, 0, 0.0);
26497 ssSetOffsetTime(childS, 0, 0.0);
26498 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
26499
26500 /* set compiled values of dynamic vector attributes */
26501 ssSetNumNonsampledZCs(childS, 0);
26502
26503 /* Update connectivity flags for each port */
26504 _ssSetInputPortConnected(childS, 0, 1);
26505 _ssSetOutputPortConnected(childS, 0, 1);
26506 _ssSetOutputPortBeingMerged(childS, 0, 0);
26507
26508 /* Update the BufferDstPort flags for each input port */
26509 _ssSetInputPortBufferDstPort(childS, 0, -1);
26510
26511 /* Instance data for generated S-Function: PositivePass */
26512 {
26513 SimStruct *rts = childS;
26514
26515#include "PositivePass_sfcn_rtw/PositivePass_sid.h"
26516
26517 }
26518 }
26519
26520 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S271>/Generated S-Function (Gain_sf) */
26521 {
26522 SimStruct *childS = ssGetSFunction(rts, 149);
26523
26524 /* timing info */
26525 static time_T sfcnPeriod[1];
26526 static time_T sfcnOffset[1];
26527 static int_T sfcnTsMap[1];
26528 (void) memset((void*)sfcnPeriod, 0,
26529 sizeof(time_T)*1);
26530 (void) memset((void*)sfcnOffset, 0,
26531 sizeof(time_T)*1);
26532 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
26533 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
26534 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
26535
26536 /* Set up the mdlInfo pointer */
26537# ifdef USE_RTMODEL
26538
26539 {
26540 static struct _ssBlkInfo2 _blkInfo2;
26541 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
26542 ssSetBlkInfo2Ptr(childS, blkInfo2);
26543 }
26544
26545 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
26546
26547# else
26548
26549 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
26550
26551# endif /* USE_RTMODEL */
26552
26553 /* Allocate memory of model methods 2 */
26554 {
26555 static struct _ssSFcnModelMethods2 methods2;
26556 ssSetModelMethods2(childS, &methods2);
26557 }
26558
26559 /* Allocate memory of model methods 3 */
26560 {
26561 static struct _ssSFcnModelMethods3 methods3;
26562 ssSetModelMethods3(childS, &methods3);
26563 }
26564
26565 /* Allocate memory for states auxilliary information */
26566 {
26567 static struct _ssStatesInfo2 statesInfo2;
26568 static ssPeriodicStatesInfo periodicStatesInfo;
26569 ssSetStatesInfo2(childS, &statesInfo2);
26570 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
26571 }
26572
26573 /* inputs */
26574 {
26575 static struct _ssPortInputs inputPortInfo[2];
26576 _ssSetNumInputPorts(childS, 2);
26577 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
26578
26579 /* port 0 */
26580 {
26581 static real32_T const *sfcnUPtrs[1];
26582 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
26583 ssGetLocalBlockIO(rts))->GeneratedSFunction_m5;
26584 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
26585 _ssSetInputPortNumDimensions(childS, 0, 1);
26586 ssSetInputPortWidth(childS, 0, 1);
26587 }
26588
26589 /* port 1 */
26590 {
26591 static real32_T const *sfcnUPtrs[1];
26592 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled132;
26593 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
26594 _ssSetInputPortNumDimensions(childS, 1, 1);
26595 ssSetInputPortWidth(childS, 1, 1);
26596 }
26597 }
26598
26599 /* outputs */
26600 {
26601 static struct _ssPortOutputs outputPortInfo[1];
26602 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
26603 _ssSetNumOutputPorts(childS, 1);
26604
26605 /* port 0 */
26606 {
26607 _ssSetOutputPortNumDimensions(childS, 0, 1);
26608 ssSetOutputPortWidth(childS, 0, 1);
26609 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
26610 *) ssGetLocalBlockIO(rts))->MinMax));
26611 }
26612 }
26613
26614 /* path info */
26615 _ssSetModelName(childS, "Gain_sf");
26616 _ssSetPath(childS,
26617 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/CAS/lon/PIDonControl/AlfaLim /gain9/Generated S-Function");
26618 if (ssGetRTModel(rts) == (NULL)) {
26619 _ssSetParentSS(childS, rts);
26620 _ssSetRootSS(childS, ssGetRootSS(rts));
26621 } else {
26622 ssSetRTModel(childS,ssGetRTModel(rts));
26623 _ssSetParentSS(childS, (NULL));
26624 _ssSetRootSS(childS, childS);
26625 }
26626
26627 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
26628
26629 /* registration */
26630 Gain_sf(childS);
26631 sfcnInitializeSizes(childS);
26632 sfcnInitializeSampleTimes(childS);
26633
26634 /* adjust sample time */
26635 ssSetSampleTime(childS, 0, 0.0);
26636 ssSetOffsetTime(childS, 0, 0.0);
26637 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
26638
26639 /* set compiled values of dynamic vector attributes */
26640 ssSetNumNonsampledZCs(childS, 0);
26641
26642 /* Update connectivity flags for each port */
26643 _ssSetInputPortConnected(childS, 0, 1);
26644 _ssSetInputPortConnected(childS, 1, 1);
26645 _ssSetOutputPortConnected(childS, 0, 1);
26646 _ssSetOutputPortBeingMerged(childS, 0, 0);
26647
26648 /* Update the BufferDstPort flags for each input port */
26649 _ssSetInputPortBufferDstPort(childS, 0, -1);
26650 _ssSetInputPortBufferDstPort(childS, 1, -1);
26651
26652 /* Instance data for generated S-Function: Gain */
26653 {
26654 SimStruct *rts = childS;
26655
26656#include "Gain_sfcn_rtw/Gain_sid.h"
26657
26658 }
26659 }
26660
26661 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S261>/Generated S-Function (Gain_sf) */
26662 {
26663 SimStruct *childS = ssGetSFunction(rts, 150);
26664
26665 /* timing info */
26666 static time_T sfcnPeriod[1];
26667 static time_T sfcnOffset[1];
26668 static int_T sfcnTsMap[1];
26669 (void) memset((void*)sfcnPeriod, 0,
26670 sizeof(time_T)*1);
26671 (void) memset((void*)sfcnOffset, 0,
26672 sizeof(time_T)*1);
26673 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
26674 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
26675 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
26676
26677 /* Set up the mdlInfo pointer */
26678# ifdef USE_RTMODEL
26679
26680 {
26681 static struct _ssBlkInfo2 _blkInfo2;
26682 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
26683 ssSetBlkInfo2Ptr(childS, blkInfo2);
26684 }
26685
26686 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
26687
26688# else
26689
26690 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
26691
26692# endif /* USE_RTMODEL */
26693
26694 /* Allocate memory of model methods 2 */
26695 {
26696 static struct _ssSFcnModelMethods2 methods2;
26697 ssSetModelMethods2(childS, &methods2);
26698 }
26699
26700 /* Allocate memory of model methods 3 */
26701 {
26702 static struct _ssSFcnModelMethods3 methods3;
26703 ssSetModelMethods3(childS, &methods3);
26704 }
26705
26706 /* Allocate memory for states auxilliary information */
26707 {
26708 static struct _ssStatesInfo2 statesInfo2;
26709 static ssPeriodicStatesInfo periodicStatesInfo;
26710 ssSetStatesInfo2(childS, &statesInfo2);
26711 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
26712 }
26713
26714 /* inputs */
26715 {
26716 static struct _ssPortInputs inputPortInfo[2];
26717 _ssSetNumInputPorts(childS, 2);
26718 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
26719
26720 /* port 0 */
26721 {
26722 static real32_T const *sfcnUPtrs[1];
26723 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
26724 ssGetLocalBlockIO(rts))->GeneratedSFunction8_p;
26725 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
26726 _ssSetInputPortNumDimensions(childS, 0, 1);
26727 ssSetInputPortWidth(childS, 0, 1);
26728 }
26729
26730 /* port 1 */
26731 {
26732 static real32_T const *sfcnUPtrs[1];
26733 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled105;
26734 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
26735 _ssSetInputPortNumDimensions(childS, 1, 1);
26736 ssSetInputPortWidth(childS, 1, 1);
26737 }
26738 }
26739
26740 /* outputs */
26741 {
26742 static struct _ssPortOutputs outputPortInfo[1];
26743 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
26744 _ssSetNumOutputPorts(childS, 1);
26745
26746 /* port 0 */
26747 {
26748 _ssSetOutputPortNumDimensions(childS, 0, 1);
26749 ssSetOutputPortWidth(childS, 0, 1);
26750 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
26751 *) ssGetLocalBlockIO(rts))->Saturation9));
26752 }
26753 }
26754
26755 /* path info */
26756 _ssSetModelName(childS, "Gain_sf");
26757 _ssSetPath(childS,
26758 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/CAS/lon/PIDonControl/gain2/Generated S-Function");
26759 if (ssGetRTModel(rts) == (NULL)) {
26760 _ssSetParentSS(childS, rts);
26761 _ssSetRootSS(childS, ssGetRootSS(rts));
26762 } else {
26763 ssSetRTModel(childS,ssGetRTModel(rts));
26764 _ssSetParentSS(childS, (NULL));
26765 _ssSetRootSS(childS, childS);
26766 }
26767
26768 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
26769
26770 /* registration */
26771 Gain_sf(childS);
26772 sfcnInitializeSizes(childS);
26773 sfcnInitializeSampleTimes(childS);
26774
26775 /* adjust sample time */
26776 ssSetSampleTime(childS, 0, 0.0);
26777 ssSetOffsetTime(childS, 0, 0.0);
26778 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
26779
26780 /* set compiled values of dynamic vector attributes */
26781 ssSetNumNonsampledZCs(childS, 0);
26782
26783 /* Update connectivity flags for each port */
26784 _ssSetInputPortConnected(childS, 0, 1);
26785 _ssSetInputPortConnected(childS, 1, 1);
26786 _ssSetOutputPortConnected(childS, 0, 1);
26787 _ssSetOutputPortBeingMerged(childS, 0, 0);
26788
26789 /* Update the BufferDstPort flags for each input port */
26790 _ssSetInputPortBufferDstPort(childS, 0, -1);
26791 _ssSetInputPortBufferDstPort(childS, 1, -1);
26792
26793 /* Instance data for generated S-Function: Gain */
26794 {
26795 SimStruct *rts = childS;
26796
26797#include "Gain_sfcn_rtw/Gain_sid.h"
26798
26799 }
26800 }
26801
26802 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S262>/Generated S-Function (Gain_sf) */
26803 {
26804 SimStruct *childS = ssGetSFunction(rts, 151);
26805
26806 /* timing info */
26807 static time_T sfcnPeriod[1];
26808 static time_T sfcnOffset[1];
26809 static int_T sfcnTsMap[1];
26810 (void) memset((void*)sfcnPeriod, 0,
26811 sizeof(time_T)*1);
26812 (void) memset((void*)sfcnOffset, 0,
26813 sizeof(time_T)*1);
26814 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
26815 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
26816 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
26817
26818 /* Set up the mdlInfo pointer */
26819# ifdef USE_RTMODEL
26820
26821 {
26822 static struct _ssBlkInfo2 _blkInfo2;
26823 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
26824 ssSetBlkInfo2Ptr(childS, blkInfo2);
26825 }
26826
26827 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
26828
26829# else
26830
26831 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
26832
26833# endif /* USE_RTMODEL */
26834
26835 /* Allocate memory of model methods 2 */
26836 {
26837 static struct _ssSFcnModelMethods2 methods2;
26838 ssSetModelMethods2(childS, &methods2);
26839 }
26840
26841 /* Allocate memory of model methods 3 */
26842 {
26843 static struct _ssSFcnModelMethods3 methods3;
26844 ssSetModelMethods3(childS, &methods3);
26845 }
26846
26847 /* Allocate memory for states auxilliary information */
26848 {
26849 static struct _ssStatesInfo2 statesInfo2;
26850 static ssPeriodicStatesInfo periodicStatesInfo;
26851 ssSetStatesInfo2(childS, &statesInfo2);
26852 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
26853 }
26854
26855 /* inputs */
26856 {
26857 static struct _ssPortInputs inputPortInfo[2];
26858 _ssSetNumInputPorts(childS, 2);
26859 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
26860
26861 /* port 0 */
26862 {
26863 static real32_T const *sfcnUPtrs[1];
26864 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
26865 ssGetLocalBlockIO(rts))->Sum6_j;
26866 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
26867 _ssSetInputPortNumDimensions(childS, 0, 1);
26868 ssSetInputPortWidth(childS, 0, 1);
26869 }
26870
26871 /* port 1 */
26872 {
26873 static real32_T const *sfcnUPtrs[1];
26874 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
26875 ssGetLocalBlockIO(rts))->Product1_j;
26876 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
26877 _ssSetInputPortNumDimensions(childS, 1, 1);
26878 ssSetInputPortWidth(childS, 1, 1);
26879 }
26880 }
26881
26882 /* outputs */
26883 {
26884 static struct _ssPortOutputs outputPortInfo[1];
26885 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
26886 _ssSetNumOutputPorts(childS, 1);
26887
26888 /* port 0 */
26889 {
26890 _ssSetOutputPortNumDimensions(childS, 0, 1);
26891 ssSetOutputPortWidth(childS, 0, 1);
26892 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
26893 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_l));
26894 }
26895 }
26896
26897 /* path info */
26898 _ssSetModelName(childS, "Gain_sf");
26899 _ssSetPath(childS,
26900 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/CAS/lon/PIDonControl/gain3/Generated S-Function");
26901 if (ssGetRTModel(rts) == (NULL)) {
26902 _ssSetParentSS(childS, rts);
26903 _ssSetRootSS(childS, ssGetRootSS(rts));
26904 } else {
26905 ssSetRTModel(childS,ssGetRTModel(rts));
26906 _ssSetParentSS(childS, (NULL));
26907 _ssSetRootSS(childS, childS);
26908 }
26909
26910 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
26911
26912 /* registration */
26913 Gain_sf(childS);
26914 sfcnInitializeSizes(childS);
26915 sfcnInitializeSampleTimes(childS);
26916
26917 /* adjust sample time */
26918 ssSetSampleTime(childS, 0, 0.0);
26919 ssSetOffsetTime(childS, 0, 0.0);
26920 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
26921
26922 /* set compiled values of dynamic vector attributes */
26923 ssSetNumNonsampledZCs(childS, 0);
26924
26925 /* Update connectivity flags for each port */
26926 _ssSetInputPortConnected(childS, 0, 1);
26927 _ssSetInputPortConnected(childS, 1, 1);
26928 _ssSetOutputPortConnected(childS, 0, 1);
26929 _ssSetOutputPortBeingMerged(childS, 0, 0);
26930
26931 /* Update the BufferDstPort flags for each input port */
26932 _ssSetInputPortBufferDstPort(childS, 0, -1);
26933 _ssSetInputPortBufferDstPort(childS, 1, -1);
26934
26935 /* Instance data for generated S-Function: Gain */
26936 {
26937 SimStruct *rts = childS;
26938
26939#include "Gain_sfcn_rtw/Gain_sid.h"
26940
26941 }
26942 }
26943
26944 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S258>/Generated S-Function1 (SaturationLimiter_sf) */
26945 {
26946 SimStruct *childS = ssGetSFunction(rts, 152);
26947
26948 /* timing info */
26949 static time_T sfcnPeriod[1];
26950 static time_T sfcnOffset[1];
26951 static int_T sfcnTsMap[1];
26952 (void) memset((void*)sfcnPeriod, 0,
26953 sizeof(time_T)*1);
26954 (void) memset((void*)sfcnOffset, 0,
26955 sizeof(time_T)*1);
26956 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
26957 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
26958 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
26959
26960 /* Set up the mdlInfo pointer */
26961# ifdef USE_RTMODEL
26962
26963 {
26964 static struct _ssBlkInfo2 _blkInfo2;
26965 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
26966 ssSetBlkInfo2Ptr(childS, blkInfo2);
26967 }
26968
26969 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
26970
26971# else
26972
26973 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
26974
26975# endif /* USE_RTMODEL */
26976
26977 /* Allocate memory of model methods 2 */
26978 {
26979 static struct _ssSFcnModelMethods2 methods2;
26980 ssSetModelMethods2(childS, &methods2);
26981 }
26982
26983 /* Allocate memory of model methods 3 */
26984 {
26985 static struct _ssSFcnModelMethods3 methods3;
26986 ssSetModelMethods3(childS, &methods3);
26987 }
26988
26989 /* Allocate memory for states auxilliary information */
26990 {
26991 static struct _ssStatesInfo2 statesInfo2;
26992 static ssPeriodicStatesInfo periodicStatesInfo;
26993 ssSetStatesInfo2(childS, &statesInfo2);
26994 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
26995 }
26996
26997 /* inputs */
26998 {
26999 static struct _ssPortInputs inputPortInfo[3];
27000 _ssSetNumInputPorts(childS, 3);
27001 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
27002
27003 /* port 0 */
27004 {
27005 static real32_T const *sfcnUPtrs[1];
27006 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
27007 ssGetLocalBlockIO(rts))->GeneratedSFunction_l;
27008 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
27009 _ssSetInputPortNumDimensions(childS, 0, 1);
27010 ssSetInputPortWidth(childS, 0, 1);
27011 }
27012
27013 /* port 1 */
27014 {
27015 static real32_T const *sfcnUPtrs[1];
27016 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled130;
27017 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
27018 _ssSetInputPortNumDimensions(childS, 1, 1);
27019 ssSetInputPortWidth(childS, 1, 1);
27020 }
27021
27022 /* port 2 */
27023 {
27024 static real32_T const *sfcnUPtrs[1];
27025 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled131;
27026 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
27027 _ssSetInputPortNumDimensions(childS, 2, 1);
27028 ssSetInputPortWidth(childS, 2, 1);
27029 }
27030 }
27031
27032 /* outputs */
27033 {
27034 static struct _ssPortOutputs outputPortInfo[1];
27035 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
27036 _ssSetNumOutputPorts(childS, 1);
27037
27038 /* port 0 */
27039 {
27040 _ssSetOutputPortNumDimensions(childS, 0, 1);
27041 ssSetOutputPortWidth(childS, 0, 1);
27042 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
27043 *) ssGetLocalBlockIO(rts))->Saturation9));
27044 }
27045 }
27046
27047 /* path info */
27048 _ssSetModelName(childS, "SaturationLimiter_sf");
27049 _ssSetPath(childS,
27050 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/CAS/lon/PIDonControl/Saturation Limiter1/Generated S-Function1");
27051 if (ssGetRTModel(rts) == (NULL)) {
27052 _ssSetParentSS(childS, rts);
27053 _ssSetRootSS(childS, ssGetRootSS(rts));
27054 } else {
27055 ssSetRTModel(childS,ssGetRTModel(rts));
27056 _ssSetParentSS(childS, (NULL));
27057 _ssSetRootSS(childS, childS);
27058 }
27059
27060 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
27061
27062 /* registration */
27063 SaturationLimiter_sf(childS);
27064 sfcnInitializeSizes(childS);
27065 sfcnInitializeSampleTimes(childS);
27066
27067 /* adjust sample time */
27068 ssSetSampleTime(childS, 0, 0.0);
27069 ssSetOffsetTime(childS, 0, 0.0);
27070 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
27071
27072 /* set compiled values of dynamic vector attributes */
27073 ssSetNumNonsampledZCs(childS, 0);
27074
27075 /* Update connectivity flags for each port */
27076 _ssSetInputPortConnected(childS, 0, 1);
27077 _ssSetInputPortConnected(childS, 1, 1);
27078 _ssSetInputPortConnected(childS, 2, 1);
27079 _ssSetOutputPortConnected(childS, 0, 1);
27080 _ssSetOutputPortBeingMerged(childS, 0, 0);
27081
27082 /* Update the BufferDstPort flags for each input port */
27083 _ssSetInputPortBufferDstPort(childS, 0, -1);
27084 _ssSetInputPortBufferDstPort(childS, 1, -1);
27085 _ssSetInputPortBufferDstPort(childS, 2, -1);
27086
27087 /* Instance data for generated S-Function: SaturationLimiter */
27088 {
27089 SimStruct *rts = childS;
27090
27091#include "SaturationLimiter_sfcn_rtw/SaturationLimiter_sid.h"
27092
27093 }
27094 }
27095
27096 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S263>/Generated S-Function (Gain_sf) */
27097 {
27098 SimStruct *childS = ssGetSFunction(rts, 153);
27099
27100 /* timing info */
27101 static time_T sfcnPeriod[1];
27102 static time_T sfcnOffset[1];
27103 static int_T sfcnTsMap[1];
27104 (void) memset((void*)sfcnPeriod, 0,
27105 sizeof(time_T)*1);
27106 (void) memset((void*)sfcnOffset, 0,
27107 sizeof(time_T)*1);
27108 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
27109 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
27110 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
27111
27112 /* Set up the mdlInfo pointer */
27113# ifdef USE_RTMODEL
27114
27115 {
27116 static struct _ssBlkInfo2 _blkInfo2;
27117 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
27118 ssSetBlkInfo2Ptr(childS, blkInfo2);
27119 }
27120
27121 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
27122
27123# else
27124
27125 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
27126
27127# endif /* USE_RTMODEL */
27128
27129 /* Allocate memory of model methods 2 */
27130 {
27131 static struct _ssSFcnModelMethods2 methods2;
27132 ssSetModelMethods2(childS, &methods2);
27133 }
27134
27135 /* Allocate memory of model methods 3 */
27136 {
27137 static struct _ssSFcnModelMethods3 methods3;
27138 ssSetModelMethods3(childS, &methods3);
27139 }
27140
27141 /* Allocate memory for states auxilliary information */
27142 {
27143 static struct _ssStatesInfo2 statesInfo2;
27144 static ssPeriodicStatesInfo periodicStatesInfo;
27145 ssSetStatesInfo2(childS, &statesInfo2);
27146 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
27147 }
27148
27149 /* inputs */
27150 {
27151 static struct _ssPortInputs inputPortInfo[2];
27152 _ssSetNumInputPorts(childS, 2);
27153 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
27154
27155 /* port 0 */
27156 {
27157 static real32_T const *sfcnUPtrs[1];
27158 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
27159 ssGetLocalBlockIO(rts))->GeneratedSFunction_l;
27160 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
27161 _ssSetInputPortNumDimensions(childS, 0, 1);
27162 ssSetInputPortWidth(childS, 0, 1);
27163 }
27164
27165 /* port 1 */
27166 {
27167 static real32_T const *sfcnUPtrs[1];
27168 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled132;
27169 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
27170 _ssSetInputPortNumDimensions(childS, 1, 1);
27171 ssSetInputPortWidth(childS, 1, 1);
27172 }
27173 }
27174
27175 /* outputs */
27176 {
27177 static struct _ssPortOutputs outputPortInfo[1];
27178 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
27179 _ssSetNumOutputPorts(childS, 1);
27180
27181 /* port 0 */
27182 {
27183 _ssSetOutputPortNumDimensions(childS, 0, 1);
27184 ssSetOutputPortWidth(childS, 0, 1);
27185 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
27186 *) ssGetLocalBlockIO(rts))->Saturation9));
27187 }
27188 }
27189
27190 /* path info */
27191 _ssSetModelName(childS, "Gain_sf");
27192 _ssSetPath(childS,
27193 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/CAS/lon/PIDonControl/gain4/Generated S-Function");
27194 if (ssGetRTModel(rts) == (NULL)) {
27195 _ssSetParentSS(childS, rts);
27196 _ssSetRootSS(childS, ssGetRootSS(rts));
27197 } else {
27198 ssSetRTModel(childS,ssGetRTModel(rts));
27199 _ssSetParentSS(childS, (NULL));
27200 _ssSetRootSS(childS, childS);
27201 }
27202
27203 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
27204
27205 /* registration */
27206 Gain_sf(childS);
27207 sfcnInitializeSizes(childS);
27208 sfcnInitializeSampleTimes(childS);
27209
27210 /* adjust sample time */
27211 ssSetSampleTime(childS, 0, 0.0);
27212 ssSetOffsetTime(childS, 0, 0.0);
27213 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
27214
27215 /* set compiled values of dynamic vector attributes */
27216 ssSetNumNonsampledZCs(childS, 0);
27217
27218 /* Update connectivity flags for each port */
27219 _ssSetInputPortConnected(childS, 0, 1);
27220 _ssSetInputPortConnected(childS, 1, 1);
27221 _ssSetOutputPortConnected(childS, 0, 1);
27222 _ssSetOutputPortBeingMerged(childS, 0, 0);
27223
27224 /* Update the BufferDstPort flags for each input port */
27225 _ssSetInputPortBufferDstPort(childS, 0, -1);
27226 _ssSetInputPortBufferDstPort(childS, 1, -1);
27227
27228 /* Instance data for generated S-Function: Gain */
27229 {
27230 SimStruct *rts = childS;
27231
27232#include "Gain_sfcn_rtw/Gain_sid.h"
27233
27234 }
27235 }
27236
27237 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S264>/Generated S-Function (Gain_sf) */
27238 {
27239 SimStruct *childS = ssGetSFunction(rts, 154);
27240
27241 /* timing info */
27242 static time_T sfcnPeriod[1];
27243 static time_T sfcnOffset[1];
27244 static int_T sfcnTsMap[1];
27245 (void) memset((void*)sfcnPeriod, 0,
27246 sizeof(time_T)*1);
27247 (void) memset((void*)sfcnOffset, 0,
27248 sizeof(time_T)*1);
27249 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
27250 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
27251 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
27252
27253 /* Set up the mdlInfo pointer */
27254# ifdef USE_RTMODEL
27255
27256 {
27257 static struct _ssBlkInfo2 _blkInfo2;
27258 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
27259 ssSetBlkInfo2Ptr(childS, blkInfo2);
27260 }
27261
27262 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
27263
27264# else
27265
27266 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
27267
27268# endif /* USE_RTMODEL */
27269
27270 /* Allocate memory of model methods 2 */
27271 {
27272 static struct _ssSFcnModelMethods2 methods2;
27273 ssSetModelMethods2(childS, &methods2);
27274 }
27275
27276 /* Allocate memory of model methods 3 */
27277 {
27278 static struct _ssSFcnModelMethods3 methods3;
27279 ssSetModelMethods3(childS, &methods3);
27280 }
27281
27282 /* Allocate memory for states auxilliary information */
27283 {
27284 static struct _ssStatesInfo2 statesInfo2;
27285 static ssPeriodicStatesInfo periodicStatesInfo;
27286 ssSetStatesInfo2(childS, &statesInfo2);
27287 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
27288 }
27289
27290 /* inputs */
27291 {
27292 static struct _ssPortInputs inputPortInfo[2];
27293 _ssSetNumInputPorts(childS, 2);
27294 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
27295
27296 /* port 0 */
27297 {
27298 static real32_T const *sfcnUPtrs[1];
27299 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
27300 ssGetLocalBlockIO(rts))->UnitDelay1_c;
27301 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
27302 _ssSetInputPortNumDimensions(childS, 0, 1);
27303 ssSetInputPortWidth(childS, 0, 1);
27304 }
27305
27306 /* port 1 */
27307 {
27308 static real32_T const *sfcnUPtrs[1];
27309 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled109;
27310 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
27311 _ssSetInputPortNumDimensions(childS, 1, 1);
27312 ssSetInputPortWidth(childS, 1, 1);
27313 }
27314 }
27315
27316 /* outputs */
27317 {
27318 static struct _ssPortOutputs outputPortInfo[1];
27319 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
27320 _ssSetNumOutputPorts(childS, 1);
27321
27322 /* port 0 */
27323 {
27324 _ssSetOutputPortNumDimensions(childS, 0, 1);
27325 ssSetOutputPortWidth(childS, 0, 1);
27326 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
27327 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_mt));
27328 }
27329 }
27330
27331 /* path info */
27332 _ssSetModelName(childS, "Gain_sf");
27333 _ssSetPath(childS,
27334 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/CAS/lon/PIDonControl/gain8/Generated S-Function");
27335 if (ssGetRTModel(rts) == (NULL)) {
27336 _ssSetParentSS(childS, rts);
27337 _ssSetRootSS(childS, ssGetRootSS(rts));
27338 } else {
27339 ssSetRTModel(childS,ssGetRTModel(rts));
27340 _ssSetParentSS(childS, (NULL));
27341 _ssSetRootSS(childS, childS);
27342 }
27343
27344 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
27345
27346 /* registration */
27347 Gain_sf(childS);
27348 sfcnInitializeSizes(childS);
27349 sfcnInitializeSampleTimes(childS);
27350
27351 /* adjust sample time */
27352 ssSetSampleTime(childS, 0, 0.005);
27353 ssSetOffsetTime(childS, 0, 0.0);
27354 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[1];
27355
27356 /* set compiled values of dynamic vector attributes */
27357 ssSetNumNonsampledZCs(childS, 0);
27358
27359 /* Update connectivity flags for each port */
27360 _ssSetInputPortConnected(childS, 0, 1);
27361 _ssSetInputPortConnected(childS, 1, 1);
27362 _ssSetOutputPortConnected(childS, 0, 1);
27363 _ssSetOutputPortBeingMerged(childS, 0, 0);
27364
27365 /* Update the BufferDstPort flags for each input port */
27366 _ssSetInputPortBufferDstPort(childS, 0, -1);
27367 _ssSetInputPortBufferDstPort(childS, 1, -1);
27368
27369 /* Instance data for generated S-Function: Gain */
27370 {
27371 SimStruct *rts = childS;
27372
27373#include "Gain_sfcn_rtw/Gain_sid.h"
27374
27375 }
27376 }
27377
27378 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S257>/Generated S-Function3 (IntegratorLimited_sf) */
27379 {
27380 SimStruct *childS = ssGetSFunction(rts, 155);
27381
27382 /* timing info */
27383 static time_T sfcnPeriod[1];
27384 static time_T sfcnOffset[1];
27385 static int_T sfcnTsMap[1];
27386 (void) memset((void*)sfcnPeriod, 0,
27387 sizeof(time_T)*1);
27388 (void) memset((void*)sfcnOffset, 0,
27389 sizeof(time_T)*1);
27390 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
27391 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
27392 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
27393
27394 /* Set up the mdlInfo pointer */
27395# ifdef USE_RTMODEL
27396
27397 {
27398 static struct _ssBlkInfo2 _blkInfo2;
27399 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
27400 ssSetBlkInfo2Ptr(childS, blkInfo2);
27401 }
27402
27403 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
27404
27405# else
27406
27407 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
27408
27409# endif /* USE_RTMODEL */
27410
27411 /* Allocate memory of model methods 2 */
27412 {
27413 static struct _ssSFcnModelMethods2 methods2;
27414 ssSetModelMethods2(childS, &methods2);
27415 }
27416
27417 /* Allocate memory of model methods 3 */
27418 {
27419 static struct _ssSFcnModelMethods3 methods3;
27420 ssSetModelMethods3(childS, &methods3);
27421 }
27422
27423 /* Allocate memory for states auxilliary information */
27424 {
27425 static struct _ssStatesInfo2 statesInfo2;
27426 static ssPeriodicStatesInfo periodicStatesInfo;
27427 ssSetStatesInfo2(childS, &statesInfo2);
27428 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
27429 }
27430
27431 /* inputs */
27432 {
27433 static struct _ssPortInputs inputPortInfo[7];
27434 _ssSetNumInputPorts(childS, 7);
27435 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
27436
27437 /* port 0 */
27438 {
27439 static real32_T const *sfcnUPtrs[1];
27440 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
27441 ssGetLocalBlockIO(rts))->dtCAS;
27442 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
27443 _ssSetInputPortNumDimensions(childS, 0, 1);
27444 ssSetInputPortWidth(childS, 0, 1);
27445 }
27446
27447 /* port 1 */
27448 {
27449 static int8_T const *sfcnUPtrs[1];
27450 sfcnUPtrs[0] = (int8_T const *) &AFCS_MODEL1_ConstP.pooled143;
27451 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
27452 _ssSetInputPortNumDimensions(childS, 1, 1);
27453 ssSetInputPortWidth(childS, 1, 1);
27454 }
27455
27456 /* port 2 */
27457 {
27458 static real32_T const *sfcnUPtrs[1];
27459 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
27460 ssGetLocalBlockIO(rts))->Sum4_iv;
27461 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
27462 _ssSetInputPortNumDimensions(childS, 2, 1);
27463 ssSetInputPortWidth(childS, 2, 1);
27464 }
27465
27466 /* port 3 */
27467 {
27468 static real32_T const *sfcnUPtrs[1];
27469 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
27470 ssGetLocalBlockIO(rts))->Sum4_iv;
27471 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
27472 _ssSetInputPortNumDimensions(childS, 3, 1);
27473 ssSetInputPortWidth(childS, 3, 1);
27474 }
27475
27476 /* port 4 */
27477 {
27478 static real32_T const *sfcnUPtrs[1];
27479 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
27480 ssGetLocalBlockIO(rts))->Add4;
27481 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
27482 _ssSetInputPortNumDimensions(childS, 4, 1);
27483 ssSetInputPortWidth(childS, 4, 1);
27484 }
27485
27486 /* port 5 */
27487 {
27488 static real32_T const *sfcnUPtrs[1];
27489 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
27490 ssGetLocalBlockIO(rts))->Add5;
27491 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
27492 _ssSetInputPortNumDimensions(childS, 5, 1);
27493 ssSetInputPortWidth(childS, 5, 1);
27494 }
27495
27496 /* port 6 */
27497 {
27498 static real32_T const *sfcnUPtrs[1];
27499 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
27500 ssGetLocalBlockIO(rts))->Sum11_c;
27501 _ssSetInputPortSignalPtrs(childS, 6, (InputPtrsType)&sfcnUPtrs[0]);
27502 _ssSetInputPortNumDimensions(childS, 6, 1);
27503 ssSetInputPortWidth(childS, 6, 1);
27504 }
27505 }
27506
27507 /* outputs */
27508 {
27509 static struct _ssPortOutputs outputPortInfo[1];
27510 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
27511 _ssSetNumOutputPorts(childS, 1);
27512
27513 /* port 0 */
27514 {
27515 _ssSetOutputPortNumDimensions(childS, 0, 1);
27516 ssSetOutputPortWidth(childS, 0, 1);
27517 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
27518 *) ssGetLocalBlockIO(rts))->deint));
27519 }
27520 }
27521
27522 /* path info */
27523 _ssSetModelName(childS, "IntegratorLimited_sf");
27524 _ssSetPath(childS,
27525 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/CAS/lon/PIDonControl/Integrator Limited/Generated S-Function3");
27526 if (ssGetRTModel(rts) == (NULL)) {
27527 _ssSetParentSS(childS, rts);
27528 _ssSetRootSS(childS, ssGetRootSS(rts));
27529 } else {
27530 ssSetRTModel(childS,ssGetRTModel(rts));
27531 _ssSetParentSS(childS, (NULL));
27532 _ssSetRootSS(childS, childS);
27533 }
27534
27535 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
27536
27537 /* work vectors */
27538 {
27539 static struct _ssDWorkRecord dWorkRecord[4];
27540 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
27541 ssSetSFcnDWork(childS, dWorkRecord);
27542 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
27543 _ssSetNumDWork(childS, 4);
27544
27545 /* DWORK0 */
27546 ssSetDWorkWidth(childS, 0, 1);
27547 ssSetDWorkDataType(childS, 0,SS_SINGLE);
27548 ssSetDWorkComplexSignal(childS, 0, 0);
27549 ssSetDWorkUsedAsDState(childS, 0, 1);
27550 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 263))[0]);
27551
27552 /* DWORK1 */
27553 ssSetDWorkWidth(childS, 1, 1);
27554 ssSetDWorkDataType(childS, 1,SS_SINGLE);
27555 ssSetDWorkComplexSignal(childS, 1, 0);
27556 ssSetDWorkUsedAsDState(childS, 1, 1);
27557 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 264))[0]);
27558
27559 /* DWORK2 */
27560 ssSetDWorkWidth(childS, 2, 1);
27561 ssSetDWorkDataType(childS, 2,SS_INT8);
27562 ssSetDWorkComplexSignal(childS, 2, 0);
27563 ssSetDWorkUsedAsDState(childS, 2, 1);
27564 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 492))[0]);
27565
27566 /* DWORK3 */
27567 ssSetDWorkWidth(childS, 3, 1);
27568 ssSetDWorkDataType(childS, 3,SS_INT8);
27569 ssSetDWorkComplexSignal(childS, 3, 0);
27570 ssSetDWorkUsedAsDState(childS, 3, 1);
27571 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 493))[0]);
27572 }
27573
27574 /* registration */
27575 IntegratorLimited_sf(childS);
27576 sfcnInitializeSizes(childS);
27577 sfcnInitializeSampleTimes(childS);
27578
27579 /* adjust sample time */
27580 ssSetSampleTime(childS, 0, 0.0);
27581 ssSetOffsetTime(childS, 0, 0.0);
27582 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
27583
27584 /* set compiled values of dynamic vector attributes */
27585 ssSetNumNonsampledZCs(childS, 0);
27586
27587 /* Update connectivity flags for each port */
27588 _ssSetInputPortConnected(childS, 0, 1);
27589 _ssSetInputPortConnected(childS, 1, 1);
27590 _ssSetInputPortConnected(childS, 2, 1);
27591 _ssSetInputPortConnected(childS, 3, 1);
27592 _ssSetInputPortConnected(childS, 4, 1);
27593 _ssSetInputPortConnected(childS, 5, 1);
27594 _ssSetInputPortConnected(childS, 6, 1);
27595 _ssSetOutputPortConnected(childS, 0, 1);
27596 _ssSetOutputPortBeingMerged(childS, 0, 0);
27597
27598 /* Update the BufferDstPort flags for each input port */
27599 _ssSetInputPortBufferDstPort(childS, 0, -1);
27600 _ssSetInputPortBufferDstPort(childS, 1, -1);
27601 _ssSetInputPortBufferDstPort(childS, 2, -1);
27602 _ssSetInputPortBufferDstPort(childS, 3, -1);
27603 _ssSetInputPortBufferDstPort(childS, 4, -1);
27604 _ssSetInputPortBufferDstPort(childS, 5, -1);
27605 _ssSetInputPortBufferDstPort(childS, 6, -1);
27606
27607 /* Instance data for generated S-Function: IntegratorLimited */
27608 {
27609 SimStruct *rts = childS;
27610
27611#include "IntegratorLimited_sfcn_rtw/IntegratorLimited_sid.h"
27612
27613 }
27614 }
27615
27616 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S250>/Generated S-Function1 (SaturationLimiter_sf) */
27617 {
27618 SimStruct *childS = ssGetSFunction(rts, 156);
27619
27620 /* timing info */
27621 static time_T sfcnPeriod[1];
27622 static time_T sfcnOffset[1];
27623 static int_T sfcnTsMap[1];
27624 (void) memset((void*)sfcnPeriod, 0,
27625 sizeof(time_T)*1);
27626 (void) memset((void*)sfcnOffset, 0,
27627 sizeof(time_T)*1);
27628 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
27629 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
27630 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
27631
27632 /* Set up the mdlInfo pointer */
27633# ifdef USE_RTMODEL
27634
27635 {
27636 static struct _ssBlkInfo2 _blkInfo2;
27637 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
27638 ssSetBlkInfo2Ptr(childS, blkInfo2);
27639 }
27640
27641 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
27642
27643# else
27644
27645 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
27646
27647# endif /* USE_RTMODEL */
27648
27649 /* Allocate memory of model methods 2 */
27650 {
27651 static struct _ssSFcnModelMethods2 methods2;
27652 ssSetModelMethods2(childS, &methods2);
27653 }
27654
27655 /* Allocate memory of model methods 3 */
27656 {
27657 static struct _ssSFcnModelMethods3 methods3;
27658 ssSetModelMethods3(childS, &methods3);
27659 }
27660
27661 /* Allocate memory for states auxilliary information */
27662 {
27663 static struct _ssStatesInfo2 statesInfo2;
27664 static ssPeriodicStatesInfo periodicStatesInfo;
27665 ssSetStatesInfo2(childS, &statesInfo2);
27666 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
27667 }
27668
27669 /* inputs */
27670 {
27671 static struct _ssPortInputs inputPortInfo[3];
27672 _ssSetNumInputPorts(childS, 3);
27673 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
27674
27675 /* port 0 */
27676 {
27677 static real32_T const *sfcnUPtrs[1];
27678 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
27679 ssGetLocalBlockIO(rts))->Switch_m;
27680 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
27681 _ssSetInputPortNumDimensions(childS, 0, 1);
27682 ssSetInputPortWidth(childS, 0, 1);
27683 }
27684
27685 /* port 1 */
27686 {
27687 static real32_T const *sfcnUPtrs[1];
27688 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled130;
27689 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
27690 _ssSetInputPortNumDimensions(childS, 1, 1);
27691 ssSetInputPortWidth(childS, 1, 1);
27692 }
27693
27694 /* port 2 */
27695 {
27696 static real32_T const *sfcnUPtrs[1];
27697 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled131;
27698 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
27699 _ssSetInputPortNumDimensions(childS, 2, 1);
27700 ssSetInputPortWidth(childS, 2, 1);
27701 }
27702 }
27703
27704 /* outputs */
27705 {
27706 static struct _ssPortOutputs outputPortInfo[1];
27707 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
27708 _ssSetNumOutputPorts(childS, 1);
27709
27710 /* port 0 */
27711 {
27712 _ssSetOutputPortNumDimensions(childS, 0, 1);
27713 ssSetOutputPortWidth(childS, 0, 1);
27714 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
27715 *) ssGetLocalBlockIO(rts))->GeneratedSFunction1_pc));
27716 }
27717 }
27718
27719 /* path info */
27720 _ssSetModelName(childS, "SaturationLimiter_sf");
27721 _ssSetPath(childS,
27722 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/CAS/lon/Saturation Limiter4/Generated S-Function1");
27723 if (ssGetRTModel(rts) == (NULL)) {
27724 _ssSetParentSS(childS, rts);
27725 _ssSetRootSS(childS, ssGetRootSS(rts));
27726 } else {
27727 ssSetRTModel(childS,ssGetRTModel(rts));
27728 _ssSetParentSS(childS, (NULL));
27729 _ssSetRootSS(childS, childS);
27730 }
27731
27732 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
27733
27734 /* registration */
27735 SaturationLimiter_sf(childS);
27736 sfcnInitializeSizes(childS);
27737 sfcnInitializeSampleTimes(childS);
27738
27739 /* adjust sample time */
27740 ssSetSampleTime(childS, 0, 0.0);
27741 ssSetOffsetTime(childS, 0, 0.0);
27742 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
27743
27744 /* set compiled values of dynamic vector attributes */
27745 ssSetNumNonsampledZCs(childS, 0);
27746
27747 /* Update connectivity flags for each port */
27748 _ssSetInputPortConnected(childS, 0, 1);
27749 _ssSetInputPortConnected(childS, 1, 1);
27750 _ssSetInputPortConnected(childS, 2, 1);
27751 _ssSetOutputPortConnected(childS, 0, 1);
27752 _ssSetOutputPortBeingMerged(childS, 0, 0);
27753
27754 /* Update the BufferDstPort flags for each input port */
27755 _ssSetInputPortBufferDstPort(childS, 0, -1);
27756 _ssSetInputPortBufferDstPort(childS, 1, -1);
27757 _ssSetInputPortBufferDstPort(childS, 2, -1);
27758
27759 /* Instance data for generated S-Function: SaturationLimiter */
27760 {
27761 SimStruct *rts = childS;
27762
27763#include "SaturationLimiter_sfcn_rtw/SaturationLimiter_sid.h"
27764
27765 }
27766 }
27767
27768 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S249>/Generated S-Function7 (RateLimiter_sf) */
27769 {
27770 SimStruct *childS = ssGetSFunction(rts, 157);
27771
27772 /* timing info */
27773 static time_T sfcnPeriod[1];
27774 static time_T sfcnOffset[1];
27775 static int_T sfcnTsMap[1];
27776 (void) memset((void*)sfcnPeriod, 0,
27777 sizeof(time_T)*1);
27778 (void) memset((void*)sfcnOffset, 0,
27779 sizeof(time_T)*1);
27780 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
27781 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
27782 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
27783
27784 /* Set up the mdlInfo pointer */
27785# ifdef USE_RTMODEL
27786
27787 {
27788 static struct _ssBlkInfo2 _blkInfo2;
27789 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
27790 ssSetBlkInfo2Ptr(childS, blkInfo2);
27791 }
27792
27793 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
27794
27795# else
27796
27797 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
27798
27799# endif /* USE_RTMODEL */
27800
27801 /* Allocate memory of model methods 2 */
27802 {
27803 static struct _ssSFcnModelMethods2 methods2;
27804 ssSetModelMethods2(childS, &methods2);
27805 }
27806
27807 /* Allocate memory of model methods 3 */
27808 {
27809 static struct _ssSFcnModelMethods3 methods3;
27810 ssSetModelMethods3(childS, &methods3);
27811 }
27812
27813 /* Allocate memory for states auxilliary information */
27814 {
27815 static struct _ssStatesInfo2 statesInfo2;
27816 static ssPeriodicStatesInfo periodicStatesInfo;
27817 ssSetStatesInfo2(childS, &statesInfo2);
27818 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
27819 }
27820
27821 /* inputs */
27822 {
27823 static struct _ssPortInputs inputPortInfo[5];
27824 _ssSetNumInputPorts(childS, 5);
27825 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
27826
27827 /* port 0 */
27828 {
27829 static int8_T const *sfcnUPtrs[1];
27830 sfcnUPtrs[0] = (int8_T const *) &AFCS_MODEL1_ConstP.pooled143;
27831 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
27832 _ssSetInputPortNumDimensions(childS, 0, 1);
27833 ssSetInputPortWidth(childS, 0, 1);
27834 }
27835
27836 /* port 1 */
27837 {
27838 static real32_T const *sfcnUPtrs[1];
27839 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
27840 ssGetLocalBlockIO(rts))->Gain_i;
27841 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
27842 _ssSetInputPortNumDimensions(childS, 1, 1);
27843 ssSetInputPortWidth(childS, 1, 1);
27844 }
27845
27846 /* port 2 */
27847 {
27848 static real32_T const *sfcnUPtrs[1];
27849 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled125;
27850 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
27851 _ssSetInputPortNumDimensions(childS, 2, 1);
27852 ssSetInputPortWidth(childS, 2, 1);
27853 }
27854
27855 /* port 3 */
27856 {
27857 static real32_T const *sfcnUPtrs[1];
27858 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
27859 ssGetLocalBlockIO(rts))->dtCAS;
27860 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
27861 _ssSetInputPortNumDimensions(childS, 3, 1);
27862 ssSetInputPortWidth(childS, 3, 1);
27863 }
27864
27865 /* port 4 */
27866 {
27867 static real32_T const *sfcnUPtrs[1];
27868 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
27869 ssGetLocalBlockIO(rts))->GeneratedSFunction1_pc;
27870 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
27871 _ssSetInputPortNumDimensions(childS, 4, 1);
27872 ssSetInputPortWidth(childS, 4, 1);
27873 }
27874 }
27875
27876 /* outputs */
27877 {
27878 static struct _ssPortOutputs outputPortInfo[2];
27879 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
27880 _ssSetNumOutputPorts(childS, 2);
27881
27882 /* port 0 */
27883 {
27884 _ssSetOutputPortNumDimensions(childS, 0, 1);
27885 ssSetOutputPortWidth(childS, 0, 1);
27886 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
27887 *) ssGetLocalBlockIO(rts))->daint));
27888 }
27889
27890 /* port 1 */
27891 {
27892 _ssSetOutputPortNumDimensions(childS, 1, 1);
27893 ssSetOutputPortWidth(childS, 1, 1);
27894 _ssSetOutputPortSignal(childS, 1, ((real32_T *) &((B_AFCS_MODEL1_T
27895 *) ssGetLocalBlockIO(rts))->GeneratedSFunction7_o2_i2));
27896 }
27897 }
27898
27899 /* path info */
27900 _ssSetModelName(childS, "RateLimiter_sf");
27901 _ssSetPath(childS,
27902 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/CAS/lon/Rate Limiter3/Generated S-Function7");
27903 if (ssGetRTModel(rts) == (NULL)) {
27904 _ssSetParentSS(childS, rts);
27905 _ssSetRootSS(childS, ssGetRootSS(rts));
27906 } else {
27907 ssSetRTModel(childS,ssGetRTModel(rts));
27908 _ssSetParentSS(childS, (NULL));
27909 _ssSetRootSS(childS, childS);
27910 }
27911
27912 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
27913
27914 /* work vectors */
27915 {
27916 static struct _ssDWorkRecord dWorkRecord[3];
27917 static struct _ssDWorkAuxRecord dWorkAuxRecord[3];
27918 ssSetSFcnDWork(childS, dWorkRecord);
27919 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
27920 _ssSetNumDWork(childS, 3);
27921
27922 /* DWORK0 */
27923 ssSetDWorkWidth(childS, 0, 1);
27924 ssSetDWorkDataType(childS, 0,SS_SINGLE);
27925 ssSetDWorkComplexSignal(childS, 0, 0);
27926 ssSetDWorkUsedAsDState(childS, 0, 1);
27927 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 265))[0]);
27928
27929 /* DWORK1 */
27930 ssSetDWorkWidth(childS, 1, 1);
27931 ssSetDWorkDataType(childS, 1,SS_INT8);
27932 ssSetDWorkComplexSignal(childS, 1, 0);
27933 ssSetDWorkUsedAsDState(childS, 1, 1);
27934 _ssSetDWork(childS, 1, &((int8_T*) ssGetDWork(rts, 494))[0]);
27935
27936 /* DWORK2 */
27937 ssSetDWorkWidth(childS, 2, 1);
27938 ssSetDWorkDataType(childS, 2,SS_INT8);
27939 ssSetDWorkComplexSignal(childS, 2, 0);
27940 ssSetDWorkUsedAsDState(childS, 2, 1);
27941 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 495))[0]);
27942 }
27943
27944 /* registration */
27945 RateLimiter_sf(childS);
27946 sfcnInitializeSizes(childS);
27947 sfcnInitializeSampleTimes(childS);
27948
27949 /* adjust sample time */
27950 ssSetSampleTime(childS, 0, 0.0);
27951 ssSetOffsetTime(childS, 0, 0.0);
27952 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
27953
27954 /* set compiled values of dynamic vector attributes */
27955 ssSetNumNonsampledZCs(childS, 0);
27956
27957 /* Update connectivity flags for each port */
27958 _ssSetInputPortConnected(childS, 0, 1);
27959 _ssSetInputPortConnected(childS, 1, 1);
27960 _ssSetInputPortConnected(childS, 2, 1);
27961 _ssSetInputPortConnected(childS, 3, 1);
27962 _ssSetInputPortConnected(childS, 4, 1);
27963 _ssSetOutputPortConnected(childS, 0, 1);
27964 _ssSetOutputPortConnected(childS, 1, 1);
27965 _ssSetOutputPortBeingMerged(childS, 0, 0);
27966 _ssSetOutputPortBeingMerged(childS, 1, 0);
27967
27968 /* Update the BufferDstPort flags for each input port */
27969 _ssSetInputPortBufferDstPort(childS, 0, -1);
27970 _ssSetInputPortBufferDstPort(childS, 1, -1);
27971 _ssSetInputPortBufferDstPort(childS, 2, -1);
27972 _ssSetInputPortBufferDstPort(childS, 3, -1);
27973 _ssSetInputPortBufferDstPort(childS, 4, -1);
27974
27975 /* Instance data for generated S-Function: RateLimiter */
27976 {
27977 SimStruct *rts = childS;
27978
27979#include "RateLimiter_sfcn_rtw/RateLimiter_sid.h"
27980
27981 }
27982 }
27983
27984 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S275>/Generated S-Function1 (SaturationLimiter_sf) */
27985 {
27986 SimStruct *childS = ssGetSFunction(rts, 158);
27987
27988 /* timing info */
27989 static time_T sfcnPeriod[1];
27990 static time_T sfcnOffset[1];
27991 static int_T sfcnTsMap[1];
27992 (void) memset((void*)sfcnPeriod, 0,
27993 sizeof(time_T)*1);
27994 (void) memset((void*)sfcnOffset, 0,
27995 sizeof(time_T)*1);
27996 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
27997 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
27998 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
27999
28000 /* Set up the mdlInfo pointer */
28001# ifdef USE_RTMODEL
28002
28003 {
28004 static struct _ssBlkInfo2 _blkInfo2;
28005 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
28006 ssSetBlkInfo2Ptr(childS, blkInfo2);
28007 }
28008
28009 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
28010
28011# else
28012
28013 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
28014
28015# endif /* USE_RTMODEL */
28016
28017 /* Allocate memory of model methods 2 */
28018 {
28019 static struct _ssSFcnModelMethods2 methods2;
28020 ssSetModelMethods2(childS, &methods2);
28021 }
28022
28023 /* Allocate memory of model methods 3 */
28024 {
28025 static struct _ssSFcnModelMethods3 methods3;
28026 ssSetModelMethods3(childS, &methods3);
28027 }
28028
28029 /* Allocate memory for states auxilliary information */
28030 {
28031 static struct _ssStatesInfo2 statesInfo2;
28032 static ssPeriodicStatesInfo periodicStatesInfo;
28033 ssSetStatesInfo2(childS, &statesInfo2);
28034 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
28035 }
28036
28037 /* inputs */
28038 {
28039 static struct _ssPortInputs inputPortInfo[3];
28040 _ssSetNumInputPorts(childS, 3);
28041 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
28042
28043 /* port 0 */
28044 {
28045 static real32_T const *sfcnUPtrs[1];
28046 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
28047 ssGetLocalBlockIO(rts))->Switch_i;
28048 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
28049 _ssSetInputPortNumDimensions(childS, 0, 1);
28050 ssSetInputPortWidth(childS, 0, 1);
28051 }
28052
28053 /* port 1 */
28054 {
28055 static real32_T const *sfcnUPtrs[1];
28056 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled105;
28057 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
28058 _ssSetInputPortNumDimensions(childS, 1, 1);
28059 ssSetInputPortWidth(childS, 1, 1);
28060 }
28061
28062 /* port 2 */
28063 {
28064 static real32_T const *sfcnUPtrs[1];
28065 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled106;
28066 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
28067 _ssSetInputPortNumDimensions(childS, 2, 1);
28068 ssSetInputPortWidth(childS, 2, 1);
28069 }
28070 }
28071
28072 /* outputs */
28073 {
28074 static struct _ssPortOutputs outputPortInfo[1];
28075 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
28076 _ssSetNumOutputPorts(childS, 1);
28077
28078 /* port 0 */
28079 {
28080 _ssSetOutputPortNumDimensions(childS, 0, 1);
28081 ssSetOutputPortWidth(childS, 0, 1);
28082 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
28083 *) ssGetLocalBlockIO(rts))->GeneratedSFunction1_hf));
28084 }
28085 }
28086
28087 /* path info */
28088 _ssSetModelName(childS, "SaturationLimiter_sf");
28089 _ssSetPath(childS,
28090 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/CAS/sb/Saturation Limiter1/Generated S-Function1");
28091 if (ssGetRTModel(rts) == (NULL)) {
28092 _ssSetParentSS(childS, rts);
28093 _ssSetRootSS(childS, ssGetRootSS(rts));
28094 } else {
28095 ssSetRTModel(childS,ssGetRTModel(rts));
28096 _ssSetParentSS(childS, (NULL));
28097 _ssSetRootSS(childS, childS);
28098 }
28099
28100 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
28101
28102 /* registration */
28103 SaturationLimiter_sf(childS);
28104 sfcnInitializeSizes(childS);
28105 sfcnInitializeSampleTimes(childS);
28106
28107 /* adjust sample time */
28108 ssSetSampleTime(childS, 0, 0.0);
28109 ssSetOffsetTime(childS, 0, 0.0);
28110 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
28111
28112 /* set compiled values of dynamic vector attributes */
28113 ssSetNumNonsampledZCs(childS, 0);
28114
28115 /* Update connectivity flags for each port */
28116 _ssSetInputPortConnected(childS, 0, 1);
28117 _ssSetInputPortConnected(childS, 1, 1);
28118 _ssSetInputPortConnected(childS, 2, 1);
28119 _ssSetOutputPortConnected(childS, 0, 1);
28120 _ssSetOutputPortBeingMerged(childS, 0, 0);
28121
28122 /* Update the BufferDstPort flags for each input port */
28123 _ssSetInputPortBufferDstPort(childS, 0, -1);
28124 _ssSetInputPortBufferDstPort(childS, 1, -1);
28125 _ssSetInputPortBufferDstPort(childS, 2, -1);
28126
28127 /* Instance data for generated S-Function: SaturationLimiter */
28128 {
28129 SimStruct *rts = childS;
28130
28131#include "SaturationLimiter_sfcn_rtw/SaturationLimiter_sid.h"
28132
28133 }
28134 }
28135
28136 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S274>/Generated S-Function7 (RateLimiter_sf) */
28137 {
28138 SimStruct *childS = ssGetSFunction(rts, 159);
28139
28140 /* timing info */
28141 static time_T sfcnPeriod[1];
28142 static time_T sfcnOffset[1];
28143 static int_T sfcnTsMap[1];
28144 (void) memset((void*)sfcnPeriod, 0,
28145 sizeof(time_T)*1);
28146 (void) memset((void*)sfcnOffset, 0,
28147 sizeof(time_T)*1);
28148 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
28149 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
28150 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
28151
28152 /* Set up the mdlInfo pointer */
28153# ifdef USE_RTMODEL
28154
28155 {
28156 static struct _ssBlkInfo2 _blkInfo2;
28157 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
28158 ssSetBlkInfo2Ptr(childS, blkInfo2);
28159 }
28160
28161 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
28162
28163# else
28164
28165 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
28166
28167# endif /* USE_RTMODEL */
28168
28169 /* Allocate memory of model methods 2 */
28170 {
28171 static struct _ssSFcnModelMethods2 methods2;
28172 ssSetModelMethods2(childS, &methods2);
28173 }
28174
28175 /* Allocate memory of model methods 3 */
28176 {
28177 static struct _ssSFcnModelMethods3 methods3;
28178 ssSetModelMethods3(childS, &methods3);
28179 }
28180
28181 /* Allocate memory for states auxilliary information */
28182 {
28183 static struct _ssStatesInfo2 statesInfo2;
28184 static ssPeriodicStatesInfo periodicStatesInfo;
28185 ssSetStatesInfo2(childS, &statesInfo2);
28186 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
28187 }
28188
28189 /* inputs */
28190 {
28191 static struct _ssPortInputs inputPortInfo[5];
28192 _ssSetNumInputPorts(childS, 5);
28193 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
28194
28195 /* port 0 */
28196 {
28197 static int8_T const *sfcnUPtrs[1];
28198 sfcnUPtrs[0] = (int8_T const *) &AFCS_MODEL1_ConstP.pooled143;
28199 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
28200 _ssSetInputPortNumDimensions(childS, 0, 1);
28201 ssSetInputPortWidth(childS, 0, 1);
28202 }
28203
28204 /* port 1 */
28205 {
28206 static real32_T const *sfcnUPtrs[1];
28207 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled106;
28208 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
28209 _ssSetInputPortNumDimensions(childS, 1, 1);
28210 ssSetInputPortWidth(childS, 1, 1);
28211 }
28212
28213 /* port 2 */
28214 {
28215 static real32_T const *sfcnUPtrs[1];
28216 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled133;
28217 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
28218 _ssSetInputPortNumDimensions(childS, 2, 1);
28219 ssSetInputPortWidth(childS, 2, 1);
28220 }
28221
28222 /* port 3 */
28223 {
28224 static real32_T const *sfcnUPtrs[1];
28225 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
28226 ssGetLocalBlockIO(rts))->dtCAS;
28227 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
28228 _ssSetInputPortNumDimensions(childS, 3, 1);
28229 ssSetInputPortWidth(childS, 3, 1);
28230 }
28231
28232 /* port 4 */
28233 {
28234 static real32_T const *sfcnUPtrs[1];
28235 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
28236 ssGetLocalBlockIO(rts))->GeneratedSFunction1_hf;
28237 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
28238 _ssSetInputPortNumDimensions(childS, 4, 1);
28239 ssSetInputPortWidth(childS, 4, 1);
28240 }
28241 }
28242
28243 /* outputs */
28244 {
28245 static struct _ssPortOutputs outputPortInfo[2];
28246 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
28247 _ssSetNumOutputPorts(childS, 2);
28248
28249 /* port 0 */
28250 {
28251 _ssSetOutputPortNumDimensions(childS, 0, 1);
28252 ssSetOutputPortWidth(childS, 0, 1);
28253 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
28254 *) ssGetLocalBlockIO(rts))->Saturation9));
28255 }
28256
28257 /* port 1 */
28258 {
28259 _ssSetOutputPortNumDimensions(childS, 1, 1);
28260 ssSetOutputPortWidth(childS, 1, 1);
28261 _ssSetOutputPortSignal(childS, 1, ((real32_T *) &((B_AFCS_MODEL1_T
28262 *) ssGetLocalBlockIO(rts))->GeneratedSFunction7_o2_f));
28263 }
28264 }
28265
28266 /* path info */
28267 _ssSetModelName(childS, "RateLimiter_sf");
28268 _ssSetPath(childS,
28269 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/CAS/sb/Rate Limiter1/Generated S-Function7");
28270 if (ssGetRTModel(rts) == (NULL)) {
28271 _ssSetParentSS(childS, rts);
28272 _ssSetRootSS(childS, ssGetRootSS(rts));
28273 } else {
28274 ssSetRTModel(childS,ssGetRTModel(rts));
28275 _ssSetParentSS(childS, (NULL));
28276 _ssSetRootSS(childS, childS);
28277 }
28278
28279 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
28280
28281 /* work vectors */
28282 {
28283 static struct _ssDWorkRecord dWorkRecord[3];
28284 static struct _ssDWorkAuxRecord dWorkAuxRecord[3];
28285 ssSetSFcnDWork(childS, dWorkRecord);
28286 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
28287 _ssSetNumDWork(childS, 3);
28288
28289 /* DWORK0 */
28290 ssSetDWorkWidth(childS, 0, 1);
28291 ssSetDWorkDataType(childS, 0,SS_SINGLE);
28292 ssSetDWorkComplexSignal(childS, 0, 0);
28293 ssSetDWorkUsedAsDState(childS, 0, 1);
28294 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 266))[0]);
28295
28296 /* DWORK1 */
28297 ssSetDWorkWidth(childS, 1, 1);
28298 ssSetDWorkDataType(childS, 1,SS_INT8);
28299 ssSetDWorkComplexSignal(childS, 1, 0);
28300 ssSetDWorkUsedAsDState(childS, 1, 1);
28301 _ssSetDWork(childS, 1, &((int8_T*) ssGetDWork(rts, 496))[0]);
28302
28303 /* DWORK2 */
28304 ssSetDWorkWidth(childS, 2, 1);
28305 ssSetDWorkDataType(childS, 2,SS_INT8);
28306 ssSetDWorkComplexSignal(childS, 2, 0);
28307 ssSetDWorkUsedAsDState(childS, 2, 1);
28308 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 497))[0]);
28309 }
28310
28311 /* registration */
28312 RateLimiter_sf(childS);
28313 sfcnInitializeSizes(childS);
28314 sfcnInitializeSampleTimes(childS);
28315
28316 /* adjust sample time */
28317 ssSetSampleTime(childS, 0, 0.0);
28318 ssSetOffsetTime(childS, 0, 0.0);
28319 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
28320
28321 /* set compiled values of dynamic vector attributes */
28322 ssSetNumNonsampledZCs(childS, 0);
28323
28324 /* Update connectivity flags for each port */
28325 _ssSetInputPortConnected(childS, 0, 1);
28326 _ssSetInputPortConnected(childS, 1, 1);
28327 _ssSetInputPortConnected(childS, 2, 1);
28328 _ssSetInputPortConnected(childS, 3, 1);
28329 _ssSetInputPortConnected(childS, 4, 1);
28330 _ssSetOutputPortConnected(childS, 0, 1);
28331 _ssSetOutputPortConnected(childS, 1, 1);
28332 _ssSetOutputPortBeingMerged(childS, 0, 0);
28333 _ssSetOutputPortBeingMerged(childS, 1, 0);
28334
28335 /* Update the BufferDstPort flags for each input port */
28336 _ssSetInputPortBufferDstPort(childS, 0, -1);
28337 _ssSetInputPortBufferDstPort(childS, 1, -1);
28338 _ssSetInputPortBufferDstPort(childS, 2, -1);
28339 _ssSetInputPortBufferDstPort(childS, 3, -1);
28340 _ssSetInputPortBufferDstPort(childS, 4, -1);
28341
28342 /* Instance data for generated S-Function: RateLimiter */
28343 {
28344 SimStruct *rts = childS;
28345
28346#include "RateLimiter_sfcn_rtw/RateLimiter_sid.h"
28347
28348 }
28349 }
28350
28351 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S215>/Generated S-Function4 (LagFilter_sf) */
28352 {
28353 SimStruct *childS = ssGetSFunction(rts, 160);
28354
28355 /* timing info */
28356 static time_T sfcnPeriod[1];
28357 static time_T sfcnOffset[1];
28358 static int_T sfcnTsMap[1];
28359 (void) memset((void*)sfcnPeriod, 0,
28360 sizeof(time_T)*1);
28361 (void) memset((void*)sfcnOffset, 0,
28362 sizeof(time_T)*1);
28363 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
28364 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
28365 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
28366
28367 /* Set up the mdlInfo pointer */
28368# ifdef USE_RTMODEL
28369
28370 {
28371 static struct _ssBlkInfo2 _blkInfo2;
28372 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
28373 ssSetBlkInfo2Ptr(childS, blkInfo2);
28374 }
28375
28376 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
28377
28378# else
28379
28380 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
28381
28382# endif /* USE_RTMODEL */
28383
28384 /* Allocate memory of model methods 2 */
28385 {
28386 static struct _ssSFcnModelMethods2 methods2;
28387 ssSetModelMethods2(childS, &methods2);
28388 }
28389
28390 /* Allocate memory of model methods 3 */
28391 {
28392 static struct _ssSFcnModelMethods3 methods3;
28393 ssSetModelMethods3(childS, &methods3);
28394 }
28395
28396 /* Allocate memory for states auxilliary information */
28397 {
28398 static struct _ssStatesInfo2 statesInfo2;
28399 static ssPeriodicStatesInfo periodicStatesInfo;
28400 ssSetStatesInfo2(childS, &statesInfo2);
28401 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
28402 }
28403
28404 /* inputs */
28405 {
28406 static struct _ssPortInputs inputPortInfo[6];
28407 _ssSetNumInputPorts(childS, 6);
28408 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
28409
28410 /* port 0 */
28411 {
28412 static real32_T const *sfcnUPtrs[1];
28413 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
28414 ssGetLocalBlockIO(rts))->dtCAS;
28415 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
28416 _ssSetInputPortNumDimensions(childS, 0, 1);
28417 ssSetInputPortWidth(childS, 0, 1);
28418 }
28419
28420 /* port 1 */
28421 {
28422 static int8_T const *sfcnUPtrs[1];
28423 sfcnUPtrs[0] = (int8_T const *) &AFCS_MODEL1_ConstP.pooled143;
28424 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
28425 _ssSetInputPortNumDimensions(childS, 1, 1);
28426 ssSetInputPortWidth(childS, 1, 1);
28427 }
28428
28429 /* port 2 */
28430 {
28431 static real32_T const *sfcnUPtrs[1];
28432 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled126;
28433 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
28434 _ssSetInputPortNumDimensions(childS, 2, 1);
28435 ssSetInputPortWidth(childS, 2, 1);
28436 }
28437
28438 /* port 3 */
28439 {
28440 static real32_T const *sfcnUPtrs[1];
28441 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
28442 ssGetLocalBlockIO(rts))->Saturation1_o;
28443 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
28444 _ssSetInputPortNumDimensions(childS, 3, 1);
28445 ssSetInputPortWidth(childS, 3, 1);
28446 }
28447
28448 /* port 4 */
28449 {
28450 static real32_T const *sfcnUPtrs[1];
28451 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
28452 ssGetLocalBlockIO(rts))->Saturation1_o;
28453 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
28454 _ssSetInputPortNumDimensions(childS, 4, 1);
28455 ssSetInputPortWidth(childS, 4, 1);
28456 }
28457
28458 /* port 5 */
28459 {
28460 static real32_T const *sfcnUPtrs[1];
28461 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
28462 ssGetLocalBlockIO(rts))->Saturation_p;
28463 _ssSetInputPortSignalPtrs(childS, 5, (InputPtrsType)&sfcnUPtrs[0]);
28464 _ssSetInputPortNumDimensions(childS, 5, 1);
28465 ssSetInputPortWidth(childS, 5, 1);
28466 }
28467 }
28468
28469 /* outputs */
28470 {
28471 static struct _ssPortOutputs outputPortInfo[1];
28472 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
28473 _ssSetNumOutputPorts(childS, 1);
28474
28475 /* port 0 */
28476 {
28477 _ssSetOutputPortNumDimensions(childS, 0, 1);
28478 ssSetOutputPortWidth(childS, 0, 1);
28479 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
28480 *) ssGetLocalBlockIO(rts))->GeneratedSFunction7_o1));
28481 }
28482 }
28483
28484 /* path info */
28485 _ssSetModelName(childS, "LagFilter_sf");
28486 _ssSetPath(childS,
28487 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/CAS/NwsBrk/ lag filter2/Generated S-Function4");
28488 if (ssGetRTModel(rts) == (NULL)) {
28489 _ssSetParentSS(childS, rts);
28490 _ssSetRootSS(childS, ssGetRootSS(rts));
28491 } else {
28492 ssSetRTModel(childS,ssGetRTModel(rts));
28493 _ssSetParentSS(childS, (NULL));
28494 _ssSetRootSS(childS, childS);
28495 }
28496
28497 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
28498
28499 /* work vectors */
28500 {
28501 static struct _ssDWorkRecord dWorkRecord[4];
28502 static struct _ssDWorkAuxRecord dWorkAuxRecord[4];
28503 ssSetSFcnDWork(childS, dWorkRecord);
28504 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
28505 _ssSetNumDWork(childS, 4);
28506
28507 /* DWORK0 */
28508 ssSetDWorkWidth(childS, 0, 1);
28509 ssSetDWorkDataType(childS, 0,SS_SINGLE);
28510 ssSetDWorkComplexSignal(childS, 0, 0);
28511 ssSetDWorkUsedAsDState(childS, 0, 1);
28512 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 267))[0]);
28513
28514 /* DWORK1 */
28515 ssSetDWorkWidth(childS, 1, 1);
28516 ssSetDWorkDataType(childS, 1,SS_SINGLE);
28517 ssSetDWorkComplexSignal(childS, 1, 0);
28518 ssSetDWorkUsedAsDState(childS, 1, 1);
28519 _ssSetDWork(childS, 1, &((real32_T*) ssGetDWork(rts, 268))[0]);
28520
28521 /* DWORK2 */
28522 ssSetDWorkWidth(childS, 2, 1);
28523 ssSetDWorkDataType(childS, 2,SS_INT8);
28524 ssSetDWorkComplexSignal(childS, 2, 0);
28525 ssSetDWorkUsedAsDState(childS, 2, 1);
28526 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 498))[0]);
28527
28528 /* DWORK3 */
28529 ssSetDWorkWidth(childS, 3, 1);
28530 ssSetDWorkDataType(childS, 3,SS_INT8);
28531 ssSetDWorkComplexSignal(childS, 3, 0);
28532 ssSetDWorkUsedAsDState(childS, 3, 1);
28533 _ssSetDWork(childS, 3, &((int8_T*) ssGetDWork(rts, 499))[0]);
28534 }
28535
28536 /* registration */
28537 LagFilter_sf(childS);
28538 sfcnInitializeSizes(childS);
28539 sfcnInitializeSampleTimes(childS);
28540
28541 /* adjust sample time */
28542 ssSetSampleTime(childS, 0, 0.0);
28543 ssSetOffsetTime(childS, 0, 0.0);
28544 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
28545
28546 /* set compiled values of dynamic vector attributes */
28547 ssSetNumNonsampledZCs(childS, 0);
28548
28549 /* Update connectivity flags for each port */
28550 _ssSetInputPortConnected(childS, 0, 1);
28551 _ssSetInputPortConnected(childS, 1, 1);
28552 _ssSetInputPortConnected(childS, 2, 1);
28553 _ssSetInputPortConnected(childS, 3, 1);
28554 _ssSetInputPortConnected(childS, 4, 1);
28555 _ssSetInputPortConnected(childS, 5, 1);
28556 _ssSetOutputPortConnected(childS, 0, 1);
28557 _ssSetOutputPortBeingMerged(childS, 0, 0);
28558
28559 /* Update the BufferDstPort flags for each input port */
28560 _ssSetInputPortBufferDstPort(childS, 0, -1);
28561 _ssSetInputPortBufferDstPort(childS, 1, -1);
28562 _ssSetInputPortBufferDstPort(childS, 2, -1);
28563 _ssSetInputPortBufferDstPort(childS, 3, -1);
28564 _ssSetInputPortBufferDstPort(childS, 4, -1);
28565 _ssSetInputPortBufferDstPort(childS, 5, -1);
28566
28567 /* Instance data for generated S-Function: LagFilter */
28568 {
28569 SimStruct *rts = childS;
28570
28571#include "LagFilter_sfcn_rtw/LagFilter_sid.h"
28572
28573 }
28574 }
28575
28576 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S218>/Generated S-Function (Gain_sf) */
28577 {
28578 SimStruct *childS = ssGetSFunction(rts, 161);
28579
28580 /* timing info */
28581 static time_T sfcnPeriod[1];
28582 static time_T sfcnOffset[1];
28583 static int_T sfcnTsMap[1];
28584 (void) memset((void*)sfcnPeriod, 0,
28585 sizeof(time_T)*1);
28586 (void) memset((void*)sfcnOffset, 0,
28587 sizeof(time_T)*1);
28588 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
28589 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
28590 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
28591
28592 /* Set up the mdlInfo pointer */
28593# ifdef USE_RTMODEL
28594
28595 {
28596 static struct _ssBlkInfo2 _blkInfo2;
28597 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
28598 ssSetBlkInfo2Ptr(childS, blkInfo2);
28599 }
28600
28601 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
28602
28603# else
28604
28605 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
28606
28607# endif /* USE_RTMODEL */
28608
28609 /* Allocate memory of model methods 2 */
28610 {
28611 static struct _ssSFcnModelMethods2 methods2;
28612 ssSetModelMethods2(childS, &methods2);
28613 }
28614
28615 /* Allocate memory of model methods 3 */
28616 {
28617 static struct _ssSFcnModelMethods3 methods3;
28618 ssSetModelMethods3(childS, &methods3);
28619 }
28620
28621 /* Allocate memory for states auxilliary information */
28622 {
28623 static struct _ssStatesInfo2 statesInfo2;
28624 static ssPeriodicStatesInfo periodicStatesInfo;
28625 ssSetStatesInfo2(childS, &statesInfo2);
28626 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
28627 }
28628
28629 /* inputs */
28630 {
28631 static struct _ssPortInputs inputPortInfo[2];
28632 _ssSetNumInputPorts(childS, 2);
28633 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
28634
28635 /* port 0 */
28636 {
28637 static real32_T const *sfcnUPtrs[1];
28638 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
28639 ssGetLocalBlockIO(rts))->Sum_b;
28640 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
28641 _ssSetInputPortNumDimensions(childS, 0, 1);
28642 ssSetInputPortWidth(childS, 0, 1);
28643 }
28644
28645 /* port 1 */
28646 {
28647 static real32_T const *sfcnUPtrs[1];
28648 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled133;
28649 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
28650 _ssSetInputPortNumDimensions(childS, 1, 1);
28651 ssSetInputPortWidth(childS, 1, 1);
28652 }
28653 }
28654
28655 /* outputs */
28656 {
28657 static struct _ssPortOutputs outputPortInfo[1];
28658 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
28659 _ssSetNumOutputPorts(childS, 1);
28660
28661 /* port 0 */
28662 {
28663 _ssSetOutputPortNumDimensions(childS, 0, 1);
28664 ssSetOutputPortWidth(childS, 0, 1);
28665 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
28666 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_ka));
28667 }
28668 }
28669
28670 /* path info */
28671 _ssSetModelName(childS, "Gain_sf");
28672 _ssSetPath(childS,
28673 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/CAS/NwsBrk/gain3/Generated S-Function");
28674 if (ssGetRTModel(rts) == (NULL)) {
28675 _ssSetParentSS(childS, rts);
28676 _ssSetRootSS(childS, ssGetRootSS(rts));
28677 } else {
28678 ssSetRTModel(childS,ssGetRTModel(rts));
28679 _ssSetParentSS(childS, (NULL));
28680 _ssSetRootSS(childS, childS);
28681 }
28682
28683 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
28684
28685 /* registration */
28686 Gain_sf(childS);
28687 sfcnInitializeSizes(childS);
28688 sfcnInitializeSampleTimes(childS);
28689
28690 /* adjust sample time */
28691 ssSetSampleTime(childS, 0, 0.0);
28692 ssSetOffsetTime(childS, 0, 0.0);
28693 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
28694
28695 /* set compiled values of dynamic vector attributes */
28696 ssSetNumNonsampledZCs(childS, 0);
28697
28698 /* Update connectivity flags for each port */
28699 _ssSetInputPortConnected(childS, 0, 1);
28700 _ssSetInputPortConnected(childS, 1, 1);
28701 _ssSetOutputPortConnected(childS, 0, 1);
28702 _ssSetOutputPortBeingMerged(childS, 0, 0);
28703
28704 /* Update the BufferDstPort flags for each input port */
28705 _ssSetInputPortBufferDstPort(childS, 0, -1);
28706 _ssSetInputPortBufferDstPort(childS, 1, -1);
28707
28708 /* Instance data for generated S-Function: Gain */
28709 {
28710 SimStruct *rts = childS;
28711
28712#include "Gain_sfcn_rtw/Gain_sid.h"
28713
28714 }
28715 }
28716
28717 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S217>/Generated S-Function1 (SaturationLimiter_sf) */
28718 {
28719 SimStruct *childS = ssGetSFunction(rts, 162);
28720
28721 /* timing info */
28722 static time_T sfcnPeriod[1];
28723 static time_T sfcnOffset[1];
28724 static int_T sfcnTsMap[1];
28725 (void) memset((void*)sfcnPeriod, 0,
28726 sizeof(time_T)*1);
28727 (void) memset((void*)sfcnOffset, 0,
28728 sizeof(time_T)*1);
28729 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
28730 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
28731 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
28732
28733 /* Set up the mdlInfo pointer */
28734# ifdef USE_RTMODEL
28735
28736 {
28737 static struct _ssBlkInfo2 _blkInfo2;
28738 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
28739 ssSetBlkInfo2Ptr(childS, blkInfo2);
28740 }
28741
28742 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
28743
28744# else
28745
28746 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
28747
28748# endif /* USE_RTMODEL */
28749
28750 /* Allocate memory of model methods 2 */
28751 {
28752 static struct _ssSFcnModelMethods2 methods2;
28753 ssSetModelMethods2(childS, &methods2);
28754 }
28755
28756 /* Allocate memory of model methods 3 */
28757 {
28758 static struct _ssSFcnModelMethods3 methods3;
28759 ssSetModelMethods3(childS, &methods3);
28760 }
28761
28762 /* Allocate memory for states auxilliary information */
28763 {
28764 static struct _ssStatesInfo2 statesInfo2;
28765 static ssPeriodicStatesInfo periodicStatesInfo;
28766 ssSetStatesInfo2(childS, &statesInfo2);
28767 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
28768 }
28769
28770 /* inputs */
28771 {
28772 static struct _ssPortInputs inputPortInfo[3];
28773 _ssSetNumInputPorts(childS, 3);
28774 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
28775
28776 /* port 0 */
28777 {
28778 static real32_T const *sfcnUPtrs[1];
28779 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
28780 ssGetLocalBlockIO(rts))->Switch_bw;
28781 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
28782 _ssSetInputPortNumDimensions(childS, 0, 1);
28783 ssSetInputPortWidth(childS, 0, 1);
28784 }
28785
28786 /* port 1 */
28787 {
28788 static real32_T const *sfcnUPtrs[1];
28789 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
28790 ssGetLocalBlockIO(rts))->Product4_o;
28791 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
28792 _ssSetInputPortNumDimensions(childS, 1, 1);
28793 ssSetInputPortWidth(childS, 1, 1);
28794 }
28795
28796 /* port 2 */
28797 {
28798 static real32_T const *sfcnUPtrs[1];
28799 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
28800 ssGetLocalBlockIO(rts))->Product3_d;
28801 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
28802 _ssSetInputPortNumDimensions(childS, 2, 1);
28803 ssSetInputPortWidth(childS, 2, 1);
28804 }
28805 }
28806
28807 /* outputs */
28808 {
28809 static struct _ssPortOutputs outputPortInfo[1];
28810 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
28811 _ssSetNumOutputPorts(childS, 1);
28812
28813 /* port 0 */
28814 {
28815 _ssSetOutputPortNumDimensions(childS, 0, 1);
28816 ssSetOutputPortWidth(childS, 0, 1);
28817 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
28818 *) ssGetLocalBlockIO(rts))->GeneratedSFunction1_hx));
28819 }
28820 }
28821
28822 /* path info */
28823 _ssSetModelName(childS, "SaturationLimiter_sf");
28824 _ssSetPath(childS,
28825 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/CAS/NwsBrk/Saturation Limiter1/Generated S-Function1");
28826 if (ssGetRTModel(rts) == (NULL)) {
28827 _ssSetParentSS(childS, rts);
28828 _ssSetRootSS(childS, ssGetRootSS(rts));
28829 } else {
28830 ssSetRTModel(childS,ssGetRTModel(rts));
28831 _ssSetParentSS(childS, (NULL));
28832 _ssSetRootSS(childS, childS);
28833 }
28834
28835 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
28836
28837 /* registration */
28838 SaturationLimiter_sf(childS);
28839 sfcnInitializeSizes(childS);
28840 sfcnInitializeSampleTimes(childS);
28841
28842 /* adjust sample time */
28843 ssSetSampleTime(childS, 0, 0.0);
28844 ssSetOffsetTime(childS, 0, 0.0);
28845 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
28846
28847 /* set compiled values of dynamic vector attributes */
28848 ssSetNumNonsampledZCs(childS, 0);
28849
28850 /* Update connectivity flags for each port */
28851 _ssSetInputPortConnected(childS, 0, 1);
28852 _ssSetInputPortConnected(childS, 1, 1);
28853 _ssSetInputPortConnected(childS, 2, 1);
28854 _ssSetOutputPortConnected(childS, 0, 1);
28855 _ssSetOutputPortBeingMerged(childS, 0, 0);
28856
28857 /* Update the BufferDstPort flags for each input port */
28858 _ssSetInputPortBufferDstPort(childS, 0, -1);
28859 _ssSetInputPortBufferDstPort(childS, 1, -1);
28860 _ssSetInputPortBufferDstPort(childS, 2, -1);
28861
28862 /* Instance data for generated S-Function: SaturationLimiter */
28863 {
28864 SimStruct *rts = childS;
28865
28866#include "SaturationLimiter_sfcn_rtw/SaturationLimiter_sid.h"
28867
28868 }
28869 }
28870
28871 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S216>/Generated S-Function7 (RateLimiter_sf) */
28872 {
28873 SimStruct *childS = ssGetSFunction(rts, 163);
28874
28875 /* timing info */
28876 static time_T sfcnPeriod[1];
28877 static time_T sfcnOffset[1];
28878 static int_T sfcnTsMap[1];
28879 (void) memset((void*)sfcnPeriod, 0,
28880 sizeof(time_T)*1);
28881 (void) memset((void*)sfcnOffset, 0,
28882 sizeof(time_T)*1);
28883 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
28884 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
28885 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
28886
28887 /* Set up the mdlInfo pointer */
28888# ifdef USE_RTMODEL
28889
28890 {
28891 static struct _ssBlkInfo2 _blkInfo2;
28892 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
28893 ssSetBlkInfo2Ptr(childS, blkInfo2);
28894 }
28895
28896 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
28897
28898# else
28899
28900 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
28901
28902# endif /* USE_RTMODEL */
28903
28904 /* Allocate memory of model methods 2 */
28905 {
28906 static struct _ssSFcnModelMethods2 methods2;
28907 ssSetModelMethods2(childS, &methods2);
28908 }
28909
28910 /* Allocate memory of model methods 3 */
28911 {
28912 static struct _ssSFcnModelMethods3 methods3;
28913 ssSetModelMethods3(childS, &methods3);
28914 }
28915
28916 /* Allocate memory for states auxilliary information */
28917 {
28918 static struct _ssStatesInfo2 statesInfo2;
28919 static ssPeriodicStatesInfo periodicStatesInfo;
28920 ssSetStatesInfo2(childS, &statesInfo2);
28921 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
28922 }
28923
28924 /* inputs */
28925 {
28926 static struct _ssPortInputs inputPortInfo[5];
28927 _ssSetNumInputPorts(childS, 5);
28928 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
28929
28930 /* port 0 */
28931 {
28932 static int8_T const *sfcnUPtrs[1];
28933 sfcnUPtrs[0] = (int8_T const *) &AFCS_MODEL1_ConstP.pooled143;
28934 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
28935 _ssSetInputPortNumDimensions(childS, 0, 1);
28936 ssSetInputPortWidth(childS, 0, 1);
28937 }
28938
28939 /* port 1 */
28940 {
28941 static real32_T const *sfcnUPtrs[1];
28942 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled106;
28943 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
28944 _ssSetInputPortNumDimensions(childS, 1, 1);
28945 ssSetInputPortWidth(childS, 1, 1);
28946 }
28947
28948 /* port 2 */
28949 {
28950 static real32_T const *sfcnUPtrs[1];
28951 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled134;
28952 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
28953 _ssSetInputPortNumDimensions(childS, 2, 1);
28954 ssSetInputPortWidth(childS, 2, 1);
28955 }
28956
28957 /* port 3 */
28958 {
28959 static real32_T const *sfcnUPtrs[1];
28960 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
28961 ssGetLocalBlockIO(rts))->dtCAS;
28962 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
28963 _ssSetInputPortNumDimensions(childS, 3, 1);
28964 ssSetInputPortWidth(childS, 3, 1);
28965 }
28966
28967 /* port 4 */
28968 {
28969 static real32_T const *sfcnUPtrs[1];
28970 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
28971 ssGetLocalBlockIO(rts))->GeneratedSFunction1_hx;
28972 _ssSetInputPortSignalPtrs(childS, 4, (InputPtrsType)&sfcnUPtrs[0]);
28973 _ssSetInputPortNumDimensions(childS, 4, 1);
28974 ssSetInputPortWidth(childS, 4, 1);
28975 }
28976 }
28977
28978 /* outputs */
28979 {
28980 static struct _ssPortOutputs outputPortInfo[2];
28981 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
28982 _ssSetNumOutputPorts(childS, 2);
28983
28984 /* port 0 */
28985 {
28986 _ssSetOutputPortNumDimensions(childS, 0, 1);
28987 ssSetOutputPortWidth(childS, 0, 1);
28988 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
28989 *) ssGetLocalBlockIO(rts))->GeneratedSFunction7_o1));
28990 }
28991
28992 /* port 1 */
28993 {
28994 _ssSetOutputPortNumDimensions(childS, 1, 1);
28995 ssSetOutputPortWidth(childS, 1, 1);
28996 _ssSetOutputPortSignal(childS, 1, ((real32_T *) &((B_AFCS_MODEL1_T
28997 *) ssGetLocalBlockIO(rts))->GeneratedSFunction7_o2_k));
28998 }
28999 }
29000
29001 /* path info */
29002 _ssSetModelName(childS, "RateLimiter_sf");
29003 _ssSetPath(childS,
29004 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/CAS/NwsBrk/Rate Limiter1/Generated S-Function7");
29005 if (ssGetRTModel(rts) == (NULL)) {
29006 _ssSetParentSS(childS, rts);
29007 _ssSetRootSS(childS, ssGetRootSS(rts));
29008 } else {
29009 ssSetRTModel(childS,ssGetRTModel(rts));
29010 _ssSetParentSS(childS, (NULL));
29011 _ssSetRootSS(childS, childS);
29012 }
29013
29014 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
29015
29016 /* work vectors */
29017 {
29018 static struct _ssDWorkRecord dWorkRecord[3];
29019 static struct _ssDWorkAuxRecord dWorkAuxRecord[3];
29020 ssSetSFcnDWork(childS, dWorkRecord);
29021 ssSetSFcnDWorkAux(childS, dWorkAuxRecord);
29022 _ssSetNumDWork(childS, 3);
29023
29024 /* DWORK0 */
29025 ssSetDWorkWidth(childS, 0, 1);
29026 ssSetDWorkDataType(childS, 0,SS_SINGLE);
29027 ssSetDWorkComplexSignal(childS, 0, 0);
29028 ssSetDWorkUsedAsDState(childS, 0, 1);
29029 _ssSetDWork(childS, 0, &((real32_T*) ssGetDWork(rts, 269))[0]);
29030
29031 /* DWORK1 */
29032 ssSetDWorkWidth(childS, 1, 1);
29033 ssSetDWorkDataType(childS, 1,SS_INT8);
29034 ssSetDWorkComplexSignal(childS, 1, 0);
29035 ssSetDWorkUsedAsDState(childS, 1, 1);
29036 _ssSetDWork(childS, 1, &((int8_T*) ssGetDWork(rts, 500))[0]);
29037
29038 /* DWORK2 */
29039 ssSetDWorkWidth(childS, 2, 1);
29040 ssSetDWorkDataType(childS, 2,SS_INT8);
29041 ssSetDWorkComplexSignal(childS, 2, 0);
29042 ssSetDWorkUsedAsDState(childS, 2, 1);
29043 _ssSetDWork(childS, 2, &((int8_T*) ssGetDWork(rts, 501))[0]);
29044 }
29045
29046 /* registration */
29047 RateLimiter_sf(childS);
29048 sfcnInitializeSizes(childS);
29049 sfcnInitializeSampleTimes(childS);
29050
29051 /* adjust sample time */
29052 ssSetSampleTime(childS, 0, 0.0);
29053 ssSetOffsetTime(childS, 0, 0.0);
29054 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
29055
29056 /* set compiled values of dynamic vector attributes */
29057 ssSetNumNonsampledZCs(childS, 0);
29058
29059 /* Update connectivity flags for each port */
29060 _ssSetInputPortConnected(childS, 0, 1);
29061 _ssSetInputPortConnected(childS, 1, 1);
29062 _ssSetInputPortConnected(childS, 2, 1);
29063 _ssSetInputPortConnected(childS, 3, 1);
29064 _ssSetInputPortConnected(childS, 4, 1);
29065 _ssSetOutputPortConnected(childS, 0, 1);
29066 _ssSetOutputPortConnected(childS, 1, 1);
29067 _ssSetOutputPortBeingMerged(childS, 0, 0);
29068 _ssSetOutputPortBeingMerged(childS, 1, 0);
29069
29070 /* Update the BufferDstPort flags for each input port */
29071 _ssSetInputPortBufferDstPort(childS, 0, -1);
29072 _ssSetInputPortBufferDstPort(childS, 1, -1);
29073 _ssSetInputPortBufferDstPort(childS, 2, -1);
29074 _ssSetInputPortBufferDstPort(childS, 3, -1);
29075 _ssSetInputPortBufferDstPort(childS, 4, -1);
29076
29077 /* Instance data for generated S-Function: RateLimiter */
29078 {
29079 SimStruct *rts = childS;
29080
29081#include "RateLimiter_sfcn_rtw/RateLimiter_sid.h"
29082
29083 }
29084 }
29085
29086 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S279>/Generated S-Function (Gain_sf) */
29087 {
29088 SimStruct *childS = ssGetSFunction(rts, 164);
29089
29090 /* timing info */
29091 static time_T sfcnPeriod[1];
29092 static time_T sfcnOffset[1];
29093 static int_T sfcnTsMap[1];
29094 (void) memset((void*)sfcnPeriod, 0,
29095 sizeof(time_T)*1);
29096 (void) memset((void*)sfcnOffset, 0,
29097 sizeof(time_T)*1);
29098 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
29099 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
29100 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
29101
29102 /* Set up the mdlInfo pointer */
29103# ifdef USE_RTMODEL
29104
29105 {
29106 static struct _ssBlkInfo2 _blkInfo2;
29107 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
29108 ssSetBlkInfo2Ptr(childS, blkInfo2);
29109 }
29110
29111 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
29112
29113# else
29114
29115 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
29116
29117# endif /* USE_RTMODEL */
29118
29119 /* Allocate memory of model methods 2 */
29120 {
29121 static struct _ssSFcnModelMethods2 methods2;
29122 ssSetModelMethods2(childS, &methods2);
29123 }
29124
29125 /* Allocate memory of model methods 3 */
29126 {
29127 static struct _ssSFcnModelMethods3 methods3;
29128 ssSetModelMethods3(childS, &methods3);
29129 }
29130
29131 /* Allocate memory for states auxilliary information */
29132 {
29133 static struct _ssStatesInfo2 statesInfo2;
29134 static ssPeriodicStatesInfo periodicStatesInfo;
29135 ssSetStatesInfo2(childS, &statesInfo2);
29136 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
29137 }
29138
29139 /* inputs */
29140 {
29141 static struct _ssPortInputs inputPortInfo[2];
29142 _ssSetNumInputPorts(childS, 2);
29143 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
29144
29145 /* port 0 */
29146 {
29147 static real32_T const *sfcnUPtrs[1];
29148 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
29149 ssGetLocalBlockIO(rts))->Sum1_o;
29150 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
29151 _ssSetInputPortNumDimensions(childS, 0, 1);
29152 ssSetInputPortWidth(childS, 0, 1);
29153 }
29154
29155 /* port 1 */
29156 {
29157 static real32_T const *sfcnUPtrs[1];
29158 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled105;
29159 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
29160 _ssSetInputPortNumDimensions(childS, 1, 1);
29161 ssSetInputPortWidth(childS, 1, 1);
29162 }
29163 }
29164
29165 /* outputs */
29166 {
29167 static struct _ssPortOutputs outputPortInfo[1];
29168 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
29169 _ssSetNumOutputPorts(childS, 1);
29170
29171 /* port 0 */
29172 {
29173 _ssSetOutputPortNumDimensions(childS, 0, 1);
29174 ssSetOutputPortWidth(childS, 0, 1);
29175 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
29176 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_gq4));
29177 }
29178 }
29179
29180 /* path info */
29181 _ssSetModelName(childS, "Gain_sf");
29182 _ssSetPath(childS,
29183 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/GNCinit1/apinit/lon/gain/Generated S-Function");
29184 if (ssGetRTModel(rts) == (NULL)) {
29185 _ssSetParentSS(childS, rts);
29186 _ssSetRootSS(childS, ssGetRootSS(rts));
29187 } else {
29188 ssSetRTModel(childS,ssGetRTModel(rts));
29189 _ssSetParentSS(childS, (NULL));
29190 _ssSetRootSS(childS, childS);
29191 }
29192
29193 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
29194
29195 /* registration */
29196 Gain_sf(childS);
29197 sfcnInitializeSizes(childS);
29198 sfcnInitializeSampleTimes(childS);
29199
29200 /* adjust sample time */
29201 ssSetSampleTime(childS, 0, 0.0);
29202 ssSetOffsetTime(childS, 0, 0.0);
29203 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
29204
29205 /* set compiled values of dynamic vector attributes */
29206 ssSetNumNonsampledZCs(childS, 0);
29207
29208 /* Update connectivity flags for each port */
29209 _ssSetInputPortConnected(childS, 0, 1);
29210 _ssSetInputPortConnected(childS, 1, 1);
29211 _ssSetOutputPortConnected(childS, 0, 1);
29212 _ssSetOutputPortBeingMerged(childS, 0, 0);
29213
29214 /* Update the BufferDstPort flags for each input port */
29215 _ssSetInputPortBufferDstPort(childS, 0, -1);
29216 _ssSetInputPortBufferDstPort(childS, 1, -1);
29217
29218 /* Instance data for generated S-Function: Gain */
29219 {
29220 SimStruct *rts = childS;
29221
29222#include "Gain_sfcn_rtw/Gain_sid.h"
29223
29224 }
29225 }
29226
29227 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S280>/Generated S-Function (Gain_sf) */
29228 {
29229 SimStruct *childS = ssGetSFunction(rts, 165);
29230
29231 /* timing info */
29232 static time_T sfcnPeriod[1];
29233 static time_T sfcnOffset[1];
29234 static int_T sfcnTsMap[1];
29235 (void) memset((void*)sfcnPeriod, 0,
29236 sizeof(time_T)*1);
29237 (void) memset((void*)sfcnOffset, 0,
29238 sizeof(time_T)*1);
29239 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
29240 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
29241 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
29242
29243 /* Set up the mdlInfo pointer */
29244# ifdef USE_RTMODEL
29245
29246 {
29247 static struct _ssBlkInfo2 _blkInfo2;
29248 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
29249 ssSetBlkInfo2Ptr(childS, blkInfo2);
29250 }
29251
29252 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
29253
29254# else
29255
29256 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
29257
29258# endif /* USE_RTMODEL */
29259
29260 /* Allocate memory of model methods 2 */
29261 {
29262 static struct _ssSFcnModelMethods2 methods2;
29263 ssSetModelMethods2(childS, &methods2);
29264 }
29265
29266 /* Allocate memory of model methods 3 */
29267 {
29268 static struct _ssSFcnModelMethods3 methods3;
29269 ssSetModelMethods3(childS, &methods3);
29270 }
29271
29272 /* Allocate memory for states auxilliary information */
29273 {
29274 static struct _ssStatesInfo2 statesInfo2;
29275 static ssPeriodicStatesInfo periodicStatesInfo;
29276 ssSetStatesInfo2(childS, &statesInfo2);
29277 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
29278 }
29279
29280 /* inputs */
29281 {
29282 static struct _ssPortInputs inputPortInfo[2];
29283 _ssSetNumInputPorts(childS, 2);
29284 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
29285
29286 /* port 0 */
29287 {
29288 static real32_T const *sfcnUPtrs[1];
29289 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
29290 ssGetLocalBlockIO(rts))->Saturation_bq;
29291 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
29292 _ssSetInputPortNumDimensions(childS, 0, 1);
29293 ssSetInputPortWidth(childS, 0, 1);
29294 }
29295
29296 /* port 1 */
29297 {
29298 static real32_T const *sfcnUPtrs[1];
29299 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled123;
29300 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
29301 _ssSetInputPortNumDimensions(childS, 1, 1);
29302 ssSetInputPortWidth(childS, 1, 1);
29303 }
29304 }
29305
29306 /* outputs */
29307 {
29308 static struct _ssPortOutputs outputPortInfo[1];
29309 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
29310 _ssSetNumOutputPorts(childS, 1);
29311
29312 /* port 0 */
29313 {
29314 _ssSetOutputPortNumDimensions(childS, 0, 1);
29315 ssSetOutputPortWidth(childS, 0, 1);
29316 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
29317 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_dw));
29318 }
29319 }
29320
29321 /* path info */
29322 _ssSetModelName(childS, "Gain_sf");
29323 _ssSetPath(childS,
29324 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/GNCinit1/apinit/lon/gain1/Generated S-Function");
29325 if (ssGetRTModel(rts) == (NULL)) {
29326 _ssSetParentSS(childS, rts);
29327 _ssSetRootSS(childS, ssGetRootSS(rts));
29328 } else {
29329 ssSetRTModel(childS,ssGetRTModel(rts));
29330 _ssSetParentSS(childS, (NULL));
29331 _ssSetRootSS(childS, childS);
29332 }
29333
29334 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
29335
29336 /* registration */
29337 Gain_sf(childS);
29338 sfcnInitializeSizes(childS);
29339 sfcnInitializeSampleTimes(childS);
29340
29341 /* adjust sample time */
29342 ssSetSampleTime(childS, 0, 0.0);
29343 ssSetOffsetTime(childS, 0, 0.0);
29344 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
29345
29346 /* set compiled values of dynamic vector attributes */
29347 ssSetNumNonsampledZCs(childS, 0);
29348
29349 /* Update connectivity flags for each port */
29350 _ssSetInputPortConnected(childS, 0, 1);
29351 _ssSetInputPortConnected(childS, 1, 1);
29352 _ssSetOutputPortConnected(childS, 0, 1);
29353 _ssSetOutputPortBeingMerged(childS, 0, 0);
29354
29355 /* Update the BufferDstPort flags for each input port */
29356 _ssSetInputPortBufferDstPort(childS, 0, -1);
29357 _ssSetInputPortBufferDstPort(childS, 1, -1);
29358
29359 /* Instance data for generated S-Function: Gain */
29360 {
29361 SimStruct *rts = childS;
29362
29363#include "Gain_sfcn_rtw/Gain_sid.h"
29364
29365 }
29366 }
29367
29368 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S281>/Generated S-Function (Gain_sf) */
29369 {
29370 SimStruct *childS = ssGetSFunction(rts, 166);
29371
29372 /* timing info */
29373 static time_T sfcnPeriod[1];
29374 static time_T sfcnOffset[1];
29375 static int_T sfcnTsMap[1];
29376 (void) memset((void*)sfcnPeriod, 0,
29377 sizeof(time_T)*1);
29378 (void) memset((void*)sfcnOffset, 0,
29379 sizeof(time_T)*1);
29380 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
29381 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
29382 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
29383
29384 /* Set up the mdlInfo pointer */
29385# ifdef USE_RTMODEL
29386
29387 {
29388 static struct _ssBlkInfo2 _blkInfo2;
29389 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
29390 ssSetBlkInfo2Ptr(childS, blkInfo2);
29391 }
29392
29393 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
29394
29395# else
29396
29397 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
29398
29399# endif /* USE_RTMODEL */
29400
29401 /* Allocate memory of model methods 2 */
29402 {
29403 static struct _ssSFcnModelMethods2 methods2;
29404 ssSetModelMethods2(childS, &methods2);
29405 }
29406
29407 /* Allocate memory of model methods 3 */
29408 {
29409 static struct _ssSFcnModelMethods3 methods3;
29410 ssSetModelMethods3(childS, &methods3);
29411 }
29412
29413 /* Allocate memory for states auxilliary information */
29414 {
29415 static struct _ssStatesInfo2 statesInfo2;
29416 static ssPeriodicStatesInfo periodicStatesInfo;
29417 ssSetStatesInfo2(childS, &statesInfo2);
29418 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
29419 }
29420
29421 /* inputs */
29422 {
29423 static struct _ssPortInputs inputPortInfo[2];
29424 _ssSetNumInputPorts(childS, 2);
29425 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
29426
29427 /* port 0 */
29428 {
29429 static real32_T const *sfcnUPtrs[1];
29430 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
29431 ssGetLocalBlockIO(rts))->Saturation_bq;
29432 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
29433 _ssSetInputPortNumDimensions(childS, 0, 1);
29434 ssSetInputPortWidth(childS, 0, 1);
29435 }
29436
29437 /* port 1 */
29438 {
29439 static real32_T const *sfcnUPtrs[1];
29440 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled105;
29441 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
29442 _ssSetInputPortNumDimensions(childS, 1, 1);
29443 ssSetInputPortWidth(childS, 1, 1);
29444 }
29445 }
29446
29447 /* outputs */
29448 {
29449 static struct _ssPortOutputs outputPortInfo[1];
29450 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
29451 _ssSetNumOutputPorts(childS, 1);
29452
29453 /* port 0 */
29454 {
29455 _ssSetOutputPortNumDimensions(childS, 0, 1);
29456 ssSetOutputPortWidth(childS, 0, 1);
29457 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
29458 *) ssGetLocalBlockIO(rts))->GeneratedSFunction_d4));
29459 }
29460 }
29461
29462 /* path info */
29463 _ssSetModelName(childS, "Gain_sf");
29464 _ssSetPath(childS,
29465 "AFCS_MODEL1/AFCS_MODEL1/GNC/Level/CodeReuseSubsystem/GNCinit1/apinit/lon/gain2/Generated S-Function");
29466 if (ssGetRTModel(rts) == (NULL)) {
29467 _ssSetParentSS(childS, rts);
29468 _ssSetRootSS(childS, ssGetRootSS(rts));
29469 } else {
29470 ssSetRTModel(childS,ssGetRTModel(rts));
29471 _ssSetParentSS(childS, (NULL));
29472 _ssSetRootSS(childS, childS);
29473 }
29474
29475 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
29476
29477 /* registration */
29478 Gain_sf(childS);
29479 sfcnInitializeSizes(childS);
29480 sfcnInitializeSampleTimes(childS);
29481
29482 /* adjust sample time */
29483 ssSetSampleTime(childS, 0, 0.0);
29484 ssSetOffsetTime(childS, 0, 0.0);
29485 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
29486
29487 /* set compiled values of dynamic vector attributes */
29488 ssSetNumNonsampledZCs(childS, 0);
29489
29490 /* Update connectivity flags for each port */
29491 _ssSetInputPortConnected(childS, 0, 1);
29492 _ssSetInputPortConnected(childS, 1, 1);
29493 _ssSetOutputPortConnected(childS, 0, 1);
29494 _ssSetOutputPortBeingMerged(childS, 0, 0);
29495
29496 /* Update the BufferDstPort flags for each input port */
29497 _ssSetInputPortBufferDstPort(childS, 0, -1);
29498 _ssSetInputPortBufferDstPort(childS, 1, -1);
29499
29500 /* Instance data for generated S-Function: Gain */
29501 {
29502 SimStruct *rts = childS;
29503
29504#include "Gain_sfcn_rtw/Gain_sid.h"
29505
29506 }
29507 }
29508
29509 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S306>/Generated S-Function15 (StickGradientDeadZone_sf) */
29510 {
29511 SimStruct *childS = ssGetSFunction(rts, 167);
29512
29513 /* timing info */
29514 static time_T sfcnPeriod[1];
29515 static time_T sfcnOffset[1];
29516 static int_T sfcnTsMap[1];
29517 (void) memset((void*)sfcnPeriod, 0,
29518 sizeof(time_T)*1);
29519 (void) memset((void*)sfcnOffset, 0,
29520 sizeof(time_T)*1);
29521 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
29522 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
29523 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
29524
29525 /* Set up the mdlInfo pointer */
29526# ifdef USE_RTMODEL
29527
29528 {
29529 static struct _ssBlkInfo2 _blkInfo2;
29530 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
29531 ssSetBlkInfo2Ptr(childS, blkInfo2);
29532 }
29533
29534 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
29535
29536# else
29537
29538 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
29539
29540# endif /* USE_RTMODEL */
29541
29542 /* Allocate memory of model methods 2 */
29543 {
29544 static struct _ssSFcnModelMethods2 methods2;
29545 ssSetModelMethods2(childS, &methods2);
29546 }
29547
29548 /* Allocate memory of model methods 3 */
29549 {
29550 static struct _ssSFcnModelMethods3 methods3;
29551 ssSetModelMethods3(childS, &methods3);
29552 }
29553
29554 /* Allocate memory for states auxilliary information */
29555 {
29556 static struct _ssStatesInfo2 statesInfo2;
29557 static ssPeriodicStatesInfo periodicStatesInfo;
29558 ssSetStatesInfo2(childS, &statesInfo2);
29559 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
29560 }
29561
29562 /* inputs */
29563 {
29564 static struct _ssPortInputs inputPortInfo[4];
29565 _ssSetNumInputPorts(childS, 4);
29566 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
29567
29568 /* port 0 */
29569 {
29570 static real32_T const *sfcnUPtrs[1];
29571 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
29572 ssGetLocalBlockIO(rts))->Switch_lo[1];
29573 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
29574 _ssSetInputPortNumDimensions(childS, 0, 1);
29575 ssSetInputPortWidth(childS, 0, 1);
29576 }
29577
29578 /* port 1 */
29579 {
29580 static real32_T const *sfcnUPtrs[1];
29581 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled109;
29582 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
29583 _ssSetInputPortNumDimensions(childS, 1, 1);
29584 ssSetInputPortWidth(childS, 1, 1);
29585 }
29586
29587 /* port 2 */
29588 {
29589 static real32_T const *sfcnUPtrs[1];
29590 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled109;
29591 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
29592 _ssSetInputPortNumDimensions(childS, 2, 1);
29593 ssSetInputPortWidth(childS, 2, 1);
29594 }
29595
29596 /* port 3 */
29597 {
29598 static real32_T const *sfcnUPtrs[1];
29599 sfcnUPtrs[0] = (real32_T const *)
29600 &AFCS_MODEL1_ConstP.Constant2_Value_o;
29601 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
29602 _ssSetInputPortNumDimensions(childS, 3, 1);
29603 ssSetInputPortWidth(childS, 3, 1);
29604 }
29605 }
29606
29607 /* outputs */
29608 {
29609 static struct _ssPortOutputs outputPortInfo[1];
29610 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
29611 _ssSetNumOutputPorts(childS, 1);
29612
29613 /* port 0 */
29614 {
29615 _ssSetOutputPortNumDimensions(childS, 0, 1);
29616 ssSetOutputPortWidth(childS, 0, 1);
29617 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
29618 *) ssGetLocalBlockIO(rts))->GeneratedSFunction15));
29619 }
29620 }
29621
29622 /* path info */
29623 _ssSetModelName(childS, "StickGradientDeadZone_sf");
29624 _ssSetPath(childS,
29625 "AFCS_MODEL1/AFCS_MODEL1/GNC/Pilot/Stick Gradient DeadZone2/Generated S-Function15");
29626 if (ssGetRTModel(rts) == (NULL)) {
29627 _ssSetParentSS(childS, rts);
29628 _ssSetRootSS(childS, ssGetRootSS(rts));
29629 } else {
29630 ssSetRTModel(childS,ssGetRTModel(rts));
29631 _ssSetParentSS(childS, (NULL));
29632 _ssSetRootSS(childS, childS);
29633 }
29634
29635 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
29636
29637 /* registration */
29638 StickGradientDeadZone_sf(childS);
29639 sfcnInitializeSizes(childS);
29640 sfcnInitializeSampleTimes(childS);
29641
29642 /* adjust sample time */
29643 ssSetSampleTime(childS, 0, 0.0);
29644 ssSetOffsetTime(childS, 0, 0.0);
29645 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
29646
29647 /* set compiled values of dynamic vector attributes */
29648 ssSetNumNonsampledZCs(childS, 0);
29649
29650 /* Update connectivity flags for each port */
29651 _ssSetInputPortConnected(childS, 0, 1);
29652 _ssSetInputPortConnected(childS, 1, 1);
29653 _ssSetInputPortConnected(childS, 2, 1);
29654 _ssSetInputPortConnected(childS, 3, 1);
29655 _ssSetOutputPortConnected(childS, 0, 1);
29656 _ssSetOutputPortBeingMerged(childS, 0, 0);
29657
29658 /* Update the BufferDstPort flags for each input port */
29659 _ssSetInputPortBufferDstPort(childS, 0, -1);
29660 _ssSetInputPortBufferDstPort(childS, 1, -1);
29661 _ssSetInputPortBufferDstPort(childS, 2, -1);
29662 _ssSetInputPortBufferDstPort(childS, 3, -1);
29663
29664 /* Instance data for generated S-Function: StickGradientDeadZone */
29665 {
29666 SimStruct *rts = childS;
29667
29668#include "StickGradientDeadZone_sfcn_rtw/StickGradientDeadZone_sid.h"
29669
29670 }
29671 }
29672
29673 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S305>/Generated S-Function15 (StickGradientDeadZone_sf) */
29674 {
29675 SimStruct *childS = ssGetSFunction(rts, 168);
29676
29677 /* timing info */
29678 static time_T sfcnPeriod[1];
29679 static time_T sfcnOffset[1];
29680 static int_T sfcnTsMap[1];
29681 (void) memset((void*)sfcnPeriod, 0,
29682 sizeof(time_T)*1);
29683 (void) memset((void*)sfcnOffset, 0,
29684 sizeof(time_T)*1);
29685 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
29686 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
29687 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
29688
29689 /* Set up the mdlInfo pointer */
29690# ifdef USE_RTMODEL
29691
29692 {
29693 static struct _ssBlkInfo2 _blkInfo2;
29694 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
29695 ssSetBlkInfo2Ptr(childS, blkInfo2);
29696 }
29697
29698 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
29699
29700# else
29701
29702 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
29703
29704# endif /* USE_RTMODEL */
29705
29706 /* Allocate memory of model methods 2 */
29707 {
29708 static struct _ssSFcnModelMethods2 methods2;
29709 ssSetModelMethods2(childS, &methods2);
29710 }
29711
29712 /* Allocate memory of model methods 3 */
29713 {
29714 static struct _ssSFcnModelMethods3 methods3;
29715 ssSetModelMethods3(childS, &methods3);
29716 }
29717
29718 /* Allocate memory for states auxilliary information */
29719 {
29720 static struct _ssStatesInfo2 statesInfo2;
29721 static ssPeriodicStatesInfo periodicStatesInfo;
29722 ssSetStatesInfo2(childS, &statesInfo2);
29723 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
29724 }
29725
29726 /* inputs */
29727 {
29728 static struct _ssPortInputs inputPortInfo[4];
29729 _ssSetNumInputPorts(childS, 4);
29730 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
29731
29732 /* port 0 */
29733 {
29734 static real32_T const *sfcnUPtrs[1];
29735 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
29736 ssGetLocalBlockIO(rts))->Switch_lo[0];
29737 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
29738 _ssSetInputPortNumDimensions(childS, 0, 1);
29739 ssSetInputPortWidth(childS, 0, 1);
29740 }
29741
29742 /* port 1 */
29743 {
29744 static real32_T const *sfcnUPtrs[1];
29745 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled109;
29746 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
29747 _ssSetInputPortNumDimensions(childS, 1, 1);
29748 ssSetInputPortWidth(childS, 1, 1);
29749 }
29750
29751 /* port 2 */
29752 {
29753 static real32_T const *sfcnUPtrs[1];
29754 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled109;
29755 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
29756 _ssSetInputPortNumDimensions(childS, 2, 1);
29757 ssSetInputPortWidth(childS, 2, 1);
29758 }
29759
29760 /* port 3 */
29761 {
29762 static real32_T const *sfcnUPtrs[1];
29763 sfcnUPtrs[0] = (real32_T const *)
29764 &AFCS_MODEL1_ConstP.Constant2_Value_o;
29765 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
29766 _ssSetInputPortNumDimensions(childS, 3, 1);
29767 ssSetInputPortWidth(childS, 3, 1);
29768 }
29769 }
29770
29771 /* outputs */
29772 {
29773 static struct _ssPortOutputs outputPortInfo[1];
29774 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
29775 _ssSetNumOutputPorts(childS, 1);
29776
29777 /* port 0 */
29778 {
29779 _ssSetOutputPortNumDimensions(childS, 0, 1);
29780 ssSetOutputPortWidth(childS, 0, 1);
29781 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
29782 *) ssGetLocalBlockIO(rts))->GeneratedSFunction15_i));
29783 }
29784 }
29785
29786 /* path info */
29787 _ssSetModelName(childS, "StickGradientDeadZone_sf");
29788 _ssSetPath(childS,
29789 "AFCS_MODEL1/AFCS_MODEL1/GNC/Pilot/Stick Gradient DeadZone1/Generated S-Function15");
29790 if (ssGetRTModel(rts) == (NULL)) {
29791 _ssSetParentSS(childS, rts);
29792 _ssSetRootSS(childS, ssGetRootSS(rts));
29793 } else {
29794 ssSetRTModel(childS,ssGetRTModel(rts));
29795 _ssSetParentSS(childS, (NULL));
29796 _ssSetRootSS(childS, childS);
29797 }
29798
29799 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
29800
29801 /* registration */
29802 StickGradientDeadZone_sf(childS);
29803 sfcnInitializeSizes(childS);
29804 sfcnInitializeSampleTimes(childS);
29805
29806 /* adjust sample time */
29807 ssSetSampleTime(childS, 0, 0.0);
29808 ssSetOffsetTime(childS, 0, 0.0);
29809 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
29810
29811 /* set compiled values of dynamic vector attributes */
29812 ssSetNumNonsampledZCs(childS, 0);
29813
29814 /* Update connectivity flags for each port */
29815 _ssSetInputPortConnected(childS, 0, 1);
29816 _ssSetInputPortConnected(childS, 1, 1);
29817 _ssSetInputPortConnected(childS, 2, 1);
29818 _ssSetInputPortConnected(childS, 3, 1);
29819 _ssSetOutputPortConnected(childS, 0, 1);
29820 _ssSetOutputPortBeingMerged(childS, 0, 0);
29821
29822 /* Update the BufferDstPort flags for each input port */
29823 _ssSetInputPortBufferDstPort(childS, 0, -1);
29824 _ssSetInputPortBufferDstPort(childS, 1, -1);
29825 _ssSetInputPortBufferDstPort(childS, 2, -1);
29826 _ssSetInputPortBufferDstPort(childS, 3, -1);
29827
29828 /* Instance data for generated S-Function: StickGradientDeadZone */
29829 {
29830 SimStruct *rts = childS;
29831
29832#include "StickGradientDeadZone_sfcn_rtw/StickGradientDeadZone_sid.h"
29833
29834 }
29835 }
29836
29837 /* RTW Generated Level2 S-Function Block: AFCS_MODEL1/<S304>/Generated S-Function15 (StickGradientDeadZone_sf) */
29838 {
29839 SimStruct *childS = ssGetSFunction(rts, 169);
29840
29841 /* timing info */
29842 static time_T sfcnPeriod[1];
29843 static time_T sfcnOffset[1];
29844 static int_T sfcnTsMap[1];
29845 (void) memset((void*)sfcnPeriod, 0,
29846 sizeof(time_T)*1);
29847 (void) memset((void*)sfcnOffset, 0,
29848 sizeof(time_T)*1);
29849 ssSetSampleTimePtr(childS, &sfcnPeriod[0]);
29850 ssSetOffsetTimePtr(childS, &sfcnOffset[0]);
29851 _ssSetSampleTimeTaskIDPtr(childS, sfcnTsMap);
29852
29853 /* Set up the mdlInfo pointer */
29854# ifdef USE_RTMODEL
29855
29856 {
29857 static struct _ssBlkInfo2 _blkInfo2;
29858 struct _ssBlkInfo2 *blkInfo2 = &_blkInfo2;
29859 ssSetBlkInfo2Ptr(childS, blkInfo2);
29860 }
29861
29862 ssSetRTWSfcnInfo(childS, ssGetRTWSfcnInfo(rts));
29863
29864# else
29865
29866 _ssSetMdlInfoPtr(childS, ssGetMdlInfoPtr(rts));
29867
29868# endif /* USE_RTMODEL */
29869
29870 /* Allocate memory of model methods 2 */
29871 {
29872 static struct _ssSFcnModelMethods2 methods2;
29873 ssSetModelMethods2(childS, &methods2);
29874 }
29875
29876 /* Allocate memory of model methods 3 */
29877 {
29878 static struct _ssSFcnModelMethods3 methods3;
29879 ssSetModelMethods3(childS, &methods3);
29880 }
29881
29882 /* Allocate memory for states auxilliary information */
29883 {
29884 static struct _ssStatesInfo2 statesInfo2;
29885 static ssPeriodicStatesInfo periodicStatesInfo;
29886 ssSetStatesInfo2(childS, &statesInfo2);
29887 ssSetPeriodicStatesInfo(childS, &periodicStatesInfo);
29888 }
29889
29890 /* inputs */
29891 {
29892 static struct _ssPortInputs inputPortInfo[4];
29893 _ssSetNumInputPorts(childS, 4);
29894 ssSetPortInfoForInputs(childS, &inputPortInfo[0]);
29895
29896 /* port 0 */
29897 {
29898 static real32_T const *sfcnUPtrs[1];
29899 sfcnUPtrs[0] = (real32_T const *) &((B_AFCS_MODEL1_T *)
29900 ssGetLocalBlockIO(rts))->Switch_lo[2];
29901 _ssSetInputPortSignalPtrs(childS, 0, (InputPtrsType)&sfcnUPtrs[0]);
29902 _ssSetInputPortNumDimensions(childS, 0, 1);
29903 ssSetInputPortWidth(childS, 0, 1);
29904 }
29905
29906 /* port 1 */
29907 {
29908 static real32_T const *sfcnUPtrs[1];
29909 sfcnUPtrs[0] = (real32_T const *) &AFCS_MODEL1_ConstP.pooled116;
29910 _ssSetInputPortSignalPtrs(childS, 1, (InputPtrsType)&sfcnUPtrs[0]);
29911 _ssSetInputPortNumDimensions(childS, 1, 1);
29912 ssSetInputPortWidth(childS, 1, 1);
29913 }
29914
29915 /* port 2 */
29916 {
29917 static real32_T const *sfcnUPtrs[1];
29918 sfcnUPtrs[0] = (real32_T const *)
29919 &AFCS_MODEL1_ConstP.Constant4_Value_m;
29920 _ssSetInputPortSignalPtrs(childS, 2, (InputPtrsType)&sfcnUPtrs[0]);
29921 _ssSetInputPortNumDimensions(childS, 2, 1);
29922 ssSetInputPortWidth(childS, 2, 1);
29923 }
29924
29925 /* port 3 */
29926 {
29927 static real32_T const *sfcnUPtrs[1];
29928 sfcnUPtrs[0] = (real32_T const *)
29929 &AFCS_MODEL1_ConstP.Constant2_Value_o;
29930 _ssSetInputPortSignalPtrs(childS, 3, (InputPtrsType)&sfcnUPtrs[0]);
29931 _ssSetInputPortNumDimensions(childS, 3, 1);
29932 ssSetInputPortWidth(childS, 3, 1);
29933 }
29934 }
29935
29936 /* outputs */
29937 {
29938 static struct _ssPortOutputs outputPortInfo[1];
29939 ssSetPortInfoForOutputs(childS, &outputPortInfo[0]);
29940 _ssSetNumOutputPorts(childS, 1);
29941
29942 /* port 0 */
29943 {
29944 _ssSetOutputPortNumDimensions(childS, 0, 1);
29945 ssSetOutputPortWidth(childS, 0, 1);
29946 _ssSetOutputPortSignal(childS, 0, ((real32_T *) &((B_AFCS_MODEL1_T
29947 *) ssGetLocalBlockIO(rts))->GeneratedSFunction15_e));
29948 }
29949 }
29950
29951 /* path info */
29952 _ssSetModelName(childS, "StickGradientDeadZone_sf");
29953 _ssSetPath(childS,
29954 "AFCS_MODEL1/AFCS_MODEL1/GNC/Pilot/Stick Gradient DeadZone/Generated S-Function15");
29955 if (ssGetRTModel(rts) == (NULL)) {
29956 _ssSetParentSS(childS, rts);
29957 _ssSetRootSS(childS, ssGetRootSS(rts));
29958 } else {
29959 ssSetRTModel(childS,ssGetRTModel(rts));
29960 _ssSetParentSS(childS, (NULL));
29961 _ssSetRootSS(childS, childS);
29962 }
29963
29964 ssSetVersion(childS, SIMSTRUCT_VERSION_LEVEL2);
29965
29966 /* registration */
29967 StickGradientDeadZone_sf(childS);
29968 sfcnInitializeSizes(childS);
29969 sfcnInitializeSampleTimes(childS);
29970
29971 /* adjust sample time */
29972 ssSetSampleTime(childS, 0, 0.0);
29973 ssSetOffsetTime(childS, 0, 0.0);
29974 sfcnTsMap[0] = ssGetSampleTimeTaskIDPtr(rts)[0];
29975
29976 /* set compiled values of dynamic vector attributes */
29977 ssSetNumNonsampledZCs(childS, 0);
29978
29979 /* Update connectivity flags for each port */
29980 _ssSetInputPortConnected(childS, 0, 1);
29981 _ssSetInputPortConnected(childS, 1, 1);
29982 _ssSetInputPortConnected(childS, 2, 1);
29983 _ssSetInputPortConnected(childS, 3, 1);
29984 _ssSetOutputPortConnected(childS, 0, 1);
29985 _ssSetOutputPortBeingMerged(childS, 0, 0);
29986
29987 /* Update the BufferDstPort flags for each input port */
29988 _ssSetInputPortBufferDstPort(childS, 0, -1);
29989 _ssSetInputPortBufferDstPort(childS, 1, -1);
29990 _ssSetInputPortBufferDstPort(childS, 2, -1);
29991 _ssSetInputPortBufferDstPort(childS, 3, -1);
29992
29993 /* Instance data for generated S-Function: StickGradientDeadZone */
29994 {
29995 SimStruct *rts = childS;
29996
29997#include "StickGradientDeadZone_sfcn_rtw/StickGradientDeadZone_sid.h"
29998
29999 }
30000 }
30001 }
30002 }
30003 }
30004}
30005